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
JoyfulGraceJoyfulGrace 

Validation to allow certain profile to change from a specific value to another

Hi!
I have the following requirement:

1.  When the status picklist value is "Hold," only allow supervisor and specialist profiles to change it. 

2. When the status is changed from hold, the hold date must be populated.

Thanks.
 
CharuDuttCharuDutt
Hii Joyful
Try Below Validation
When the status is changed from hold, the hold date must be populated.

AND(ISPICKVAL(Status,'Hold'),ISBLANK(Hold_Date__c))

When the status picklist value is "Hold," only allow supervisor and specialist profiles to change it. 

AND($Profile.Name <> 'Profile Name' ,ISPICKVAL(Status,'Hold'), ISCHANGED(Status))
Please Mark It As Best Answer If It Helps
Thank You!
JoyfulGraceJoyfulGrace
I tried the first one and it is not working as expected. The rule should trigger when the status ischanged from Hold and it fires when it is changed to.
Sai PraveenSai Praveen (Salesforce Developers) 
Hi,

Try the below two validation rules:

1.  When the status picklist value is "Hold," only allow supervisor and specialist profiles to change it. 
 
AND(AND($Profile.Name <> 'ProfileName1' ,$Profile.Name <> 'ProfileName2') ,ISPICKVAL(PRIORVALUE(Status),"Hold"), ISCHANGED(Status))

2. When the status is changed from hold, the hold date must be populated.
 
AND( ISCHANGED( Status ) ,ISPICKVAL(PRIORVALUE(Status),"Hold"), ISBLANK(Hold_Date__c) )

If this solution helps, Please mark it as best answer.

Thanks,