How is the error: SalesforceSalesforce entity_is_deleted caused?

178    Asked by DanPeters in Salesforce , Asked on Aug 28, 2023

After inserting the trigger of object A, where I delete records of object B, the error SalesforceSalesforce entity_is_deleted is displayed:


I only get this error while the test runs the code in the non-queueable or synchronous context. 

There is no DML statement except in the second line. Also, I have debug strings set up for all my codes so that all classes run entirely. Can anyone please help me to understand the cause of this?

Answered by dia shrinidhi

As I have understood, the issue is appearing due to using DMLWrapper from the TDTM framework. You can add the to-be-deleted records before the delete function for the DMLWrapper to update because the actions are taking place at the end of the transaction, and before the update DMLWrapper, they are getting deleted.


Your Answer

Interviews

Parent Categories