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
the_wolfthe_wolf 

Time based workflow - How to fire it after a Apex trigger update?

Hi all,

 

I have a workflow that sends an email after 72 hours from activation date of the rule (a field value insert or update).

 

So, it works fine when I update this field throw user interface, or throw an Apex trigger insert. But it not fired when the field is updated throw an Apex trigger update.

 

I read in the Salesforce on line guide this consideration on time based workflow:

"Time-based workflow rules are not reevaluated if an Apex post trigger executed as a result of a workflow rule or approval process updates a field so its value no longer meets the time-based workflow rule criteria."

What does this mean exactly?


And how do I activate that rule anyway? I need it after an automatic update of the field by Apex trigger.

 

Thanks in advance!

dev401hasdev401has

It should work fine when a field is updated using Update Trigger!

 

The line you are mentioning is not creating the problem for you. The line means that if after the rule is evaluated and workflow rule has been fired and because of that if any update occurs in the field such that the rule no longer stands true then it wont re-evaulate and stop the workflow email alert. The time based workflow email will continue.

 

May be because of the update trigger there may be other update trigger also who will be nullifying the effect of your update trigger so that it is not entering your workflow rule.

 

Can you elaborate what is happening in your after update trigger and what is your workflow-rule criteria?

 

 

 

 

the_wolfthe_wolf

Thanks for reply dev401has,

 

uhm.. "there may be other update trigger also who will be nullifying the effect of your update trigger so that it is not entering your workflow rule."

 

Infact, I have more triggers (before and after) on the same custom object... If this were the reason, there would be a way to "start" a trigger than another?