Skip to main content
Teja Banka (Independent) a posé une question dans #Apex

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 réponses
  1. Forum Ambassador Eric Burté (DEVOTEAM)
    9 nov. 2023, 06: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