You need to sign in to do that
Don't have an account?
Trigger that changes a field that fires off a Workflow rule has stopped working - any ideas?
So in one part of our system, the following happens:
- a trigger changes the value of a picklist on a custom object
- a Workflow rule detects that change and fires off an email.
Since about the 4th of December though, it seems to have stopped working.
The workflow rule is pretty simple, so I don't really understand whats preventing it.
The details of the rule are:
Operates on a custom object.Evaluation Criteria: When a record is created, or when a record is edited and did not previously meet the rule criteria
Rule Criteria: ISPICKVAL(Status__c, 'Not Started')
Active: Yes
Immediate Workflow Actions: an email alert
Edit: The rule does fire if I manually update the object to set the appropriate status, but does not fire when a trigger updates the status.
Any ideas?
thanks.
I eventually found out that the problem was due to the Spring 09 Workflow updates, which were rolled out to all orgs at the start of December.
Spring '09 Workflow Rule and Roll-Up Summary Field Evaluations update
After this change to the platform, Workflow no longer re-evaulates twice for a single action on an object, and due to specific things happening in our set of triggers, that was our problem.
All Answers
Hai,
Condn which u give :
While Creating
1.Status Value : Not Started
While Updating
1.Status Value : Not Started
2.Status Value : Previous and current value should not equal
Thanks,
DevatSFDC
if you want any more details,Please drop an email to discuss.
devatsfdc@googlemail.com
I have now figured out that the Rule is firing for manual edits, but not when a trigger makes the edits.
Can changes made by Triggers kick off Workflow Rules?
yes. the obvious question is: are you sure your trigger is working? :-)
In this document:
http://www.salesforce.com/us/developer/docs/apexcode/index.htm
Read the page on Triggers and Order of Execution. There are some notes about recursive updates to the triggering object which could be relevant to your situation (although I doubt it).
In Trigger,what you are doing...if youdidnt change the value of status,the workflow wont trigger.Previous and Current value shouls not be the same and status should be Not Started
I eventually found out that the problem was due to the Spring 09 Workflow updates, which were rolled out to all orgs at the start of December.
Spring '09 Workflow Rule and Roll-Up Summary Field Evaluations update
After this change to the platform, Workflow no longer re-evaulates twice for a single action on an object, and due to specific things happening in our set of triggers, that was our problem.