Skip to main content
Avalara Help Center

How do I resolve 'AVA SFCORE:Too many DML statements: 151' in Salesforce?


When trying to calculate tax on a Quote or Opportunity in Salesforce you receive the following error:

"AVA_SFCORE:Too many DML statements: 151 Error is in expression '{!TestConnection} ' in component <apex:page> in page ava_sfcore:taxnowsettings_testconnect_handler: (AVA_SFCORE) An unexpected error has occurred. Your solution provider has been notified. (AVA_SFCORE)'"




  • Please take the following steps:
    • Setup--> Developer Console
    • Debug--> execute anonymous window
    • Run below code 20 times to delete the AVA_SFCORE_UserMessage__c
      • Code Snippets :
        • List<AVA_SFCORE__UserMessage__c >listAcctoDelete= [select id,name from AVA_SFCORE__UserMessage__c limit 2000];
        • delete listAcctoDelete;​​​​​​​

NOTE: There are two underscores in multiple places of this code snippet.