function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karthikeyan KannanKarthikeyan Kannan 

How to avoid Query Exceeding while adding a field to an Email template 'm getting the following Error: make sure the object is not in development mode: SOQL statements can not be longer than 20000 characters

Hi,
Can any one give me a solution without Deleting the field and without Deleting the Query.
Nilesh Jagtap (NJ)Nilesh Jagtap (NJ)
Hi Karthikeyan,

Chack if you can use dynamic soql (refernce http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_dynamic_soql.htm).
Also check if you can have list/array of Ids in where clause instead of string of comma seperated values.


Thanks,
N.J.
Ankit AroraAnkit Arora
There is no such direct way to do this, but you can raise the case with salesforce to increase the limit. Also am not sure if we've the limit in dynamic query, so rather going with direct query would recommend you to use dynamic query once and let me know.
Karthikeyan KannanKarthikeyan Kannan
Thanks for the reply N.j and Ankit Arora But my problem is we created  Templates with Visual Force Page and in the VF Page only getting this Error while Adding a field into it, I am a Beginner so could you please give me a Good Solution with an Explanation.


Thanks & Regards,
KARTHIKEYAN K.