function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris Walters 9Chris Walters 9 

trigger knowledge of other triggers

Can a trigger know what fired it? Example -  LiveChatTranscriptTrigger.bulkAfter()   creates several new Contacts. This fires off several ContactTrigger methods. But is there a way ContractTrigger can know that these new Contacts "came from" LiveChatTranscriptTrigger?

Any ideas?

Still-learning Chris
VinayVinay (Salesforce Developers) 
Hi Chris,

Setup debug logs and replicate the issue this will help you to know which component and method has made DML operation in your org.

Debug log is only way that can help you to narrow down and identify the exact component.

https://help.salesforce.com/articleView?id=code_add_users_debug_log.htm&type=5
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_debugging_debug_log.htm

Thanks,
Vinay Kumar