Activity › Forums › Salesforce® Discussions › Why can we not query fields of type long text in Salesforce?
Tagged: Heap Size, Long Text Area, Performance Optimization, Query Fields, SOQL
-
Why can we not query fields of type long text in Salesforce?
Posted by shradha jain on August 3, 2018 at 1:09 PMWhy can we not query fields of type long text in Salesforce?
Parul replied 7 years, 8 months ago 4 Members · 3 Replies -
3 Replies
-
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.
- [adinserter block='9']
-
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.
-
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.