2

If an Quick Action creates a record and the creation of that record results in an Apex trigger being executed, can the Trigger determine which Action (if any) created the record?

The Action could, of course, set a new field (say a checkbox) to a particular value and the Trigger can then check for that value. However, the potential problem with this is if/when such a record is cloned this field will then have that particular value and the new logic will be incorrectly executed.

4
  • 4
    Check if this one helps -- developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/…
    – kurunve
    Commented Aug 15, 2023 at 15:54
  • Thanks! So with Request.getCurrent().getQuiddity() I can determine that the trigger is being executed as a result of a Quick Action... I guess there's no way to determine which particular Quick Action, right?
    – John Lewis
    Commented Aug 15, 2023 at 17:32
  • 2
    Correct. Quddity only gives you the general context.
    – sfdcfox
    Commented Aug 15, 2023 at 18:31
  • use pre-defined fields of quick action to pass value of which action it was Commented Aug 15, 2023 at 18:54

0

You must log in to answer this question.

Browse other questions tagged .