Skip to main content
Avalara Help Center

How can we resolve the error: "AvaTax for Salesforce AVA_SFCORE.OppLineTrigger BeforeInsert error with List index 0 error"?


The following error occurs while working in Salesforce:

AVA_SFCORE.OppLineTrigger: execution of BeforeInsert caused by: System.ListException: List index out of bounds: 0 (AVA_SFCORE)




  • Verify the TaxNow Settings with the AvaTax account information have been setup.
    • A blank set of settings will cause this.
    • If the settings are populated and the above error is still happening, please contact Avalara
  • This error can also occur when you have customized forms in SalesForce.
    • Make sure the fields required for tax calculation are enabled and visible on the form
      • Required information for tax calculation can be found here.
    • Make sure the item being added has a quantity entered in the item list
  • In some circumstances, this error indicates the following code would need to be added to your test methods:  
    AVA_SFCORE__TaxNowSetting__c ts1 = new AVA_SFCORE__TaxNowSetting__c(); 
    ts1.AVA_SFCORE__Active_Setting__c = true; 
    ts1.Name='Test Account';
    insert ts1;