How many conditions we can add in a model to fetch records ?

  • 1
  • Question
  • Updated 2 years ago
  • Answered
We are creating dynamic conditions to query records. Thus, final SOQL query created for fetching records may contain more than 20k characters. So is there any SOQL Character limit in skuid. 
Photo of sumit


  • 428 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 54,246 Points 50k badge 2x thumb
SOQL queries generated using Skuid Models are subject to the limits documented here:

Some of the key limits to be aware of:

1. The generated WHERE clause (which Skuid Model Conditions are translated to for Salesforce) may only be 4000 characters in length.
2. The total generated SOQL query may only be 20000 characters in length.

If you are running into this limit, I would strongly consider rethinking your approach to adding dynamic conditions. In particular, consider trying to use the "Result of Subquery" Condition type to limit a Model to records with a related record in another object.