How to: Solve "Too many SOQL queries: 101" within AddressTools
AddressTools triggers handle the standardization and validation of address data on records that exist in your Org where the solution is configured. To guarantee that the solution does what it needs to, by default, the Apex 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 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 Org, “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.