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
BenPBenP 

Not Re-evaluating?

I have the following workflow / field update and asked it to re-evaluate after running, but it seems to stop after the first time.

 

AND (
ISPICKVAL( Status__c , "Open" ) ,
OR (
Due_Date_Weekday__c = "Saturday" ,
Due_Date_Weekday__c = "Sunday" )
)

 Due_Date_Weekday__c is a formula field.  Is that formula not calculated until the record is commited, or do you think it's something else?

I just need to move the due date up so it's not set to saturday or sunday.

Best Answer chosen by Admin (Salesforce Developers) 
Jeff MayJeff May

What do you mean 'stops after the first time'?  The Workflows will re-evaluate, to see if a Rule that didn't fire before should now fire.   This will only happen once to make sure you don't get into an endless cycle of a Field Update just updating over and over forever.

All Answers

Jeff MayJeff May

What do you mean 'stops after the first time'?  The Workflows will re-evaluate, to see if a Rule that didn't fire before should now fire.   This will only happen once to make sure you don't get into an endless cycle of a Field Update just updating over and over forever.

This was selected as the best answer
BenPBenP

I think your last sentence explains it.  The system won't keep checking to avoid a loop.

 

I have another rule that moves the date up by one if the part shipping is a certain part.  What I wanted it to do is see the new date is "saturday" then bump the date by one.  Now re-evaluate the rule to see it's "sunday" and bump the date by one again. 

 

What I see happening is the date is changed by the first rule, then changed by the second rule, but the second rule is not re-evaluated.

 

 

Maybe I need to re-evaluate the whole thing.

BenPBenP

I ended up going with a case function in the field update.

 

CASE( SVMXC__Parts_Request__r.Due_Date_Day__c , 
"Friday",  SVMXC__Parts_Request__r.Due_Date__c + 3, 
SVMXC__Parts_Request__r.Due_Date__c + 1)