Skip to main content

I have a time-based workflow that updates a custom object. It's job is to check a date/time field and update a boolean field on the record.

Associated with this is an apex trigger that looks for trigger.old = false and trigger.new=true.  If the condition is satisfied, its job is to execute an http post.

The performance seems to be inconsistent.  I am wondering if I am approaching this the correct way or if there's a better method.

Is there an order of operations that would cause the trigger to be evaluated before the trigger? Or perhaps a better approach to this all together? TIA!

답변 3개
  1. 2018년 10월 15일 오후 8:52
    Yes order of exceution is there and before trigger execure first then WorkFlow. 

     

    https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

     

    If your WF rule is only updating a field, then u can add that logic to the trigger itself and that will fall in one order of exceution. give it a try and see the perfemance
0/9000