You need to sign in to do that
Don't have an account?
Formula field or Auto-update field do not trigger Workflow Rule
Hello there,
In my project, on an object I have two fields. One is an auto-update and other is a formula field. Auto-update field contains 'Current Date' value ( 'TODAY()' ). Formula field is number type, calculating difference in days between a custom DATE field and above auto-update DATE field.
I am trying to trigger, a workflow rule that will fire when value of formula field would be 30 or 60.
Please help me out as the workflow is not getting triggered when the above formula evaluates to true.
Thank you in advance.
Thank you for your response.
However, I guess you did not get the actual problem that I faced. The workflow is supposed to fire when the auto-update field i.e. Current date will change. The other field is formula field calculating No. of days between two dates. One is Cutom date field and other is Current date.
Even if I try to fire a workflow to update either Current date or No. of days, you need to update that particular record.
So, as a conclusion I found a solution to write a Schedular that will fire everyday, and it will calculate no. of days and update it. This will cause all dependent workflows to fire.
I implemented this solution in my project, and its working fine and uninterrupted now.
Thank you for your knowledge sharing.
All Answers
Workflow doesn't fire on formula fields, as the field isn't stored in the database and so doesn't get updated. What happens is when you retrieve the record, the value is calculated and the field populated.
There's a couple of ways around this:
(1) Don't use a formula field, but use a regular field and a workflow field update that replicates the formula. That way the field will be stored in the database.
(2) Replicate the formula in your workflow rule and fire it every time a record is created or edited.
I am using a workflow that gets fired when the value of a formula field changed, and it works perfectly.
Is there other conditions that can prevent workflow on formula field to fire?
-Hengky-
If the formula field is the only thing that changes, this will not cause a workflow to fire:
http://success.salesforce.com/ideaView?id=08730000000BrIGAA0
However, if fields that contribute in to the formula field change, that will trigger it.
So for example if the formula field is to pull in a value from a related object, a change to the related object won't cause the workflow to fire.
Thank you for your response.
However, I guess you did not get the actual problem that I faced. The workflow is supposed to fire when the auto-update field i.e. Current date will change. The other field is formula field calculating No. of days between two dates. One is Cutom date field and other is Current date.
Even if I try to fire a workflow to update either Current date or No. of days, you need to update that particular record.
So, as a conclusion I found a solution to write a Schedular that will fire everyday, and it will calculate no. of days and update it. This will cause all dependent workflows to fire.
I implemented this solution in my project, and its working fine and uninterrupted now.
Thank you for your knowledge sharing.
Even I am facing the same issues.
Thank you!