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
tf_ianrtf_ianr 

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. 

Message Edited by tf_ianr on 12-14-2009 09:27 AM
Message Edited by tf_ianr on 12-16-2009 04:52 AM
Best Answer chosen by Admin (Salesforce Developers) 
tf_ianrtf_ianr

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

AmmukuttiAmmukutti

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

 

tf_ianrtf_ianr
Thanks for your answer Ammukutti, but I don't understand what youre trying to say.
tf_ianrtf_ianr

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? 

SteveBowerSteveBower

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).

AmmukuttiAmmukutti

 

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

tf_ianrtf_ianr

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.

This was selected as the best answer