+ Start a Discussion
emacaioneemacaione 

Validation Rule Formula Question

 

 My validation rule says that the status of my object can only go from the "Prospect" status to the "Tentative" or "Lost" status values. How can I create a formula to reflect this?

Best Answer chosen by Admin (Salesforce Developers) 
Steve MolisSteve Molis

Oh ye of little faith...  did you think the Answers Community would let you down?   ;-p

 

 

CASE( Status , 
"Prospect",1, 
"Tentative",2, 
"Tentative with Contact",2,
 "Turn Down",2, 
"Lost",2,0) 
< 
CASE(PRIORVALUE(Status) , 
"Prospect",1, 
"Tentative",2, 
"Tentative with Contact",2,
 "Turn Down",2, 
"Lost",2,0) 

 

All Answers

Steve MolisSteve Molis

Oh ye of little faith...  did you think the Answers Community would let you down?   ;-p

 

 

CASE( Status , 
"Prospect",1, 
"Tentative",2, 
"Tentative with Contact",2,
 "Turn Down",2, 
"Lost",2,0) 
< 
CASE(PRIORVALUE(Status) , 
"Prospect",1, 
"Tentative",2, 
"Tentative with Contact",2,
 "Turn Down",2, 
"Lost",2,0) 

 

This was selected as the best answer
emacaioneemacaione

Hey, you never know where the code writers are looking! ;-)