How to tell which trigger will be action first when there ar

Posted by caylali on 25-Feb-2016 20:28

Hi Team,

I had set up 2 triggers to create "customer" and "contact" when a "lead" is "close and won", the question is how do I know which trigger will be action first, as I need to create a relationship between "customer" and "contact" at the same time. What I can think of is writing a big trunk of code to create two records in one trigger. Any easier way to achieve this?

All Replies

Posted by Sri Harsha on 26-Feb-2016 00:43

Hi Caylali,

I am assuming the "close and won" is a workflow status and you would like to invoke two triggers on that status change.

The Workflow action of type "Run Triggers" does the exact thing.  You can specify the tirggers to run and it follows the order specified in the action.

Please see the below doc link on the same.

documentation.progress.com/.../

Hope that helps. Please get back if you need anything else.

Regards,

Harsha.

Posted by Thierry Ciot on 26-Feb-2016 08:49

Yes you can create one large trigger.  

If what you are trying to do is split the logic into smaller chunks, you could write one object script trigger that will invoke the 2 triggers via the runtrigger api - see documentation.progress.com/.../

Thierry.

Posted by murali on 26-Feb-2016 09:00
Triggers run  in a predicable order  according to Trigger Order Number ( In object def page > Triggers; look for   Order Number & Reorder button )
Posted by caylali on 28-Feb-2016 17:21

Thanks everyone. Glad to know there are multiple creative ways to solve this issue.

Posted by caylali on 29-Feb-2016 01:20

Problem resolved. Thanks a lot.

This thread is closed