Skip to main content

I wrote a trigger to update the financial accounts and functionality is working fine but I am getting this test failure for the class, not able to fig out ?

 

Error :

System.DmlException: Update failed. First exception on row 0 with id a0F53000001GnPXEA0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, WT_FinancialAccountTrigger: execution of AfterUpdate

 

caused by: System.ListException: Duplicate id in list: 0015300000SwxABAAZ

 

Class.WT_FinancialAccountAfterHandler.rollupOnAccount: line 223, column 1

Class.WT_FinancialAccountAfterHandler.afterUpdate: line 38, column 1

Class.TriggerHandler.run: line 74, column 1

Trigger.WT_FinancialAccountTrigger: line 36, column 1: []

 

#Apex #ApexDevelopment #Salesforce Developer

5 件の回答
  1. Eric Burté (DEVOTEAM) Forum Ambassador
    2023年11月9日 6:41

    @Teja Banka, Could you show us the trigger as well, and what  is done in WT_FinancialAccountTrigger / WT_FinancialAccountAfterHandler.afterUpdate: line 38 / WT_FinancialAccountAfterHandler.rollupOnAccount: (line 223) ? Could you please explain a bit the trigger / handler context ?

    Eric

0/9000