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
bensondanielbensondaniel 

Validation Rule

PRIORVALUE(TEXT(Status__c))= 'Withdrawn'

 

 

In the above code Status__c is a picklist.

I want to throw ann error if it change from withdrown to anything else.

This is not working...

 

I use   TEXT(Status__c) to return the srting value for Status__c, but this is not an acceptable parameter for

PRIORVALUE

 

Can somebody pls help me..

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard
This isn't really Apex development, but according to the help you should use ispickval, e.g. ISPICKVAL(PRIORVALUE(picklist_field), text_literal)

All Answers

bob_buzzardbob_buzzard
This isn't really Apex development, but according to the help you should use ispickval, e.g. ISPICKVAL(PRIORVALUE(picklist_field), text_literal)
This was selected as the best answer
bensondanielbensondaniel

cheers bob..!