When you use the Salesforce Opportunity button “Create NetSuite Order”, it triggers 3 flows:
- Salesforce Account to NetSuite Customer
- Salesforce Contact to NetSuite Contact
- Salesforce Opportunity to NetSuite Sales Order
Sometimes it results in a “too many SOQL queries” error. Salesforce enforces governor limits of 100 SOQL queries per transaction. The number is calculated by multiplying the number of records (e.g. contacts, in this case) with the number of triggers/scripts on the record (e.g. the Salesforce Contact object). In addition, the Salesforce Opportunity to NetSuite Sales Order flow consumes a few SOQL queries.
For example, if there are 45 contacts and 2 triggers/scripts on the contact records, that would be 90 of 100 SOQL queries triggered. If there are 3 triggers/scripts on the contact record, and you have 34 contacts, that will exceed the limit of 100, so the sync will result in the “too many SOQL queries” error. Again, because the Salesforce Opportunity flow has some triggers, 33 contacts will also exceed the limit.
Out of the box, the Salesforce Connector has 2 triggers on the contact record. So, up to 45 contacts could sync. If you, as a Celigo customer, have added additional triggers, the number of contacts that will sync will be reduced accordingly.
In conclusion:
- If you have no extra triggers in Salesforce Opportunity, Salesforce Account, or Salesforce Contact, you can have up to 45 contacts per Account without hitting the “too many SOQL queries”.
- If you have extra triggers in your environment besides those included in the Celigo Salesforce Connector, a smaller number of contacts per Salesforce Account could result in the “too many SOQL queries” error.
- The best way to reduce the number of contacts that sync is to implement Contact Role Filtering (see this article for assistance).
Comments
0 comments
Please sign in to leave a comment.