Cause
Salesforce limits TaroWorks to 100 SOQL queries per transaction. SOQL stands for Salesforce Object Query Language. You use SOQL to read information stored in your org's database.
Solution
In order to prevent a single Form from using too many SOQL queries, the following must be true:
.03[Qreg+(Qrep+1)*R]+Or+Os+Ou < 74
where:
Qreg = Number of questions in all your regular sections
Qrep = Number of questions in your repeat section
R = Maximum number of times you expect a mobile user to repeat the repeat section
Or = Number of objects referenced in Field Mapping
Os = Number of objects with scores mapped to them in Field Mapping
Ou = Number of objects updated in Field Mapping
If you have more than one repeat section in your form, you would add in the number of questions and repeats for each repeat section in series as follows:
.03[Qreg+(Qrepa+1)*Ra+(Qrepb+1)*Rb+(Qrepc+1)*Rc...]+Or+Os+Ou < 74
where:
Qreg= Number of questions in all your regular sections
Qrepa= Number of questions in the first repeat section
Ra = Maximum number of times you expect a mobile user to repeat the first repeat section
Qrepb= Number of questions in the second repeat section
Rb = Maximum number of times you expect a mobile user to repeat the second repeat section
Qrepc= Number of questions in the third repeat section
Rc = Maximum number of times you expect a mobile user to repeat the third repeat section
Or = Number of objects referenced in Field Mapping
Os = Number of objects with scores mapped to them in Field Mapping
Ou = Number of objects updated in Field Mapping
You can reduce any of the above variables in your Form until the formula is true, and syncing the form will not meet the Salesforce SOQL limit. Typically adjusting your field mapping is not possible, so reducing the number of questions in your repeat section or the number of repeats is the most effective. You can also break your Form down into multiple Forms if possible.
Note: if you have any custom automations initiated by your sync that query Salesforce in the same transaction, those would need to be added as well.
Comments
0 comments
Please sign in to leave a comment.