Activity Forums Salesforce® Discussions Why can we not query fields of type long text in Salesforce?

  • Avnish Yadav

    Member
    August 7, 2018 at 6:13 am

    Hi Shradha,

    In SOQL you simply cannot filter on long text areas, well the reason maybe Salesforce is doing some optimizations to prevent it from reaching the heap size.

    Hope this will help you.

    Thanks.

  • shariq

    Member
    September 12, 2018 at 12:08 am

    Hi Shraddha and Avinish,

    You can query records for long text type field but you can't put these fields in WHERE clause.

    For more understanding the scenario, lets get deep into it, what is stopping those fields to be used in a where clause, answer is field's length. Salesforce don't allow the fields to be used in where clause if their length is greater than 255.

    Hope this helps.

  • Parul

    Member
    September 12, 2018 at 4:51 am

    Hi

    You can query records for long text type field but you can’t get these fields in WHERE clause because the fields to be used in where clause if their length is greater than 255 which give incorrect result.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos