How to: Solve "Too many SOQL queries: 101" within AddressTools
AddressTools’ triggers handle the standardization, validation, and some elements of verification in a Salesforce Organization where the solution is configured.
To guarantee that the solution does what it is designed to do, the functionality invoked by the trigger will loop until it guarantees it is the last operation in the transaction. This ensures that if there are any other processes executing that touch the address data during the transaction, the changes AddressTools makes will be retained.
A side effect of this behavior is that for some Orgs, “Too many SOQL queries: 101” can occur during an insert or update operation, more commonly during mass operations.
To disable the looping behavior, follow the steps below:
- Go to AddressTools Administration tab.
- Select the Settings sub-tab.
- Enable “Run the AddressTools trigger to validate / standardize objects only once”.
- Select Save All.
If you are still experiencing issues and need assistance, contact firstname.lastname@example.org.