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
kfrankfran 

Need Help With Validation Rule

Hello,

 

I currently have the picklist Validation Rule below in Opportunities under Stage:

 

AND (
     ISPICKVAL( StageName, "Won-Contract Signed") ,
     NOT(ISPICKVAL( PRIORVALUE(StageName) ,"Visited") ) )

This makes it so my sales team cannot select the Stage Name "Won-Contract Signed" unless they select Stage Name "Visited" first.  However, if they have already selected "Visited" and then go to edit the record, this rule makes them select "Visited" Again in order to save.  How can I re-work the rule so that if they've already selected Visited, the system does not require them to select it Again? 

 

Any help would be much appreciated.

 

Thank you.

werewolfwerewolf
Why don't you make a custom checkbox field called "Visited" (don't show it on the page layout though) and a workflow field update that sets that checkbox to checked if the stage is Visited?  Then your validation rule can just look to see if that checkbox field is checked, which it will be if the stage was ever Visited.