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
Dave@FPDave@FP 

Formula for Workflow Rule

I want to make a forumla for a workflow rule that checks if the prior value was null (this particular field "Actual_Ship_Date" gets edited in a tracking form when the order gets shipped) and then checks if it was changed.

Basically if "Actual_Ship_Date" has changed, it will trigger a field update for another object. I just need this to validate first. I'm getting an error for this formula and I'm not sure where to go with it:


Code:
PRIORVALUE(ISNULL(Actual_Ship_Date__c)) = TRUE
ISCHANGED(Actual_Ship_Date__c))

How should I be putting this to make it work properly? I've looked through the documentation - but I gotta say, Salesforce documentation has driven me nuts ever since I tried making this stupid sales order system.
werewolfwerewolf
I think you need the AND function.  The Salesforce formula language is very much analogous to the Excel formula language (for better or worse), so I think this will accomplish what you're looking for:

Code:
AND ( PRIORVALUE(ISNULL(Actual_Ship_Date__c)) , ISCHANGED(Actual_Ship_Date__c)) )

 
Dave@FPDave@FP
Error: Syntax error. Extra ')'

Now when I removed that extra ')':
Error: Function PRIORVALUE may not be used in this type of formula
werewolfwerewolf
Wait -- I see two typos in my own code.  Shame on me.  One is the parenthesis, but the other...


Code:
AND ( ISNULL(PRIORVALUE(Actual_Ship_Date__c)) , ISCHANGED(Actual_Ship_Date__c))

The ISNULL and PRIORVALUE were backwards.
Dave@FPDave@FP
haha, no problem :) thanks for the update - it saved :)
kmirakmira
I need a workfloew rule that will:

Not send an alert to Sales Management when a deal is Closed Lost, and the prior stage value
was either Identified or Dialog Initiated

I started but I can not get it right...
Cann someone help!

Code:
PRIORVALUE(Stage=Identified,Dialog Initiated)= TRUE
LTDLTD

I tried to use this and adjust it for our system, as we are trying to do something very similar, and i am getting some odd messages, like

Error: Function PRIORVALUE may not be used in this type of formula
The only thing i changed was the name of the custom field.  Will this work on opportunities? is there something i'm missing?
thanks!