I have a managed package with different triggers.

Is there a way to get the calling source that invoked the trigger action? For example: if other package initiated the action, get its namespace, and also if it is from other context like an action from email, etc...

I need to get as much information as possible regarding the action's source.

Any ideas?


  • 1
    There are a couple of answers that touch fairly close to this question. Can you elaborate on what information you need for what purpose?
    – David Reed
    Jun 24, 2019 at 11:51
  • The purpose is for monitoring the source of actions performed on objects in an organization. to be more specific - I would like to know whether the action was manually performed by the user in VF or called from a different source like an installed package. Jun 24, 2019 at 12:18

1 Answer 1


It seems that you want to monitor the usage of some specific org resources, like when a user visits and interacts with a Visualforce page or component, and it calls Apex, etc.

You might be out of luck if you want to know if the user called an action with a button or a trigger, because it will show on the event log that the user "called this code at this time", not necessarily it will display if they clicked something.

My suggestion is to take a look at the EventLogFile object and the trail about it on Trailhead. It should contain more information than you need to, but at least is something you can query and throw at some spreadsheet software instead of writing Apex code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.