+ Start a Discussion

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:

PRIORVALUE(ISNULL(Actual_Ship_Date__c)) = TRUE

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

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

Error: Syntax error. Extra ')'

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

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

The ISNULL and PRIORVALUE were backwards.
haha, no problem :) thanks for the update - it saved :)
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!

PRIORVALUE(Stage=Identified,Dialog Initiated)= TRUE

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?