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
RajashriRajashri 

Validation Rule on Role

Hi,

I have created the checkbox field Physician.I want to put the validation rule that if current value of this field is not equal to prior value then user with role "VP Finance" can  update this field.

i tried to design the below rule but it's incomplete.how can i check "current value of this field is not equal to prior value" in the below rule.

AND(
ISCHANGED(Dormant_Physician__c),
$UserRole.Name <> "VP Finance")

can anyone please help?

Rajashri
Best Answer chosen by Rajashri
gautam_singhgautam_singh
Hi, 

This works correctly ! 

AND(
ISCHANGED(gautamsingh__testCheckbox__c),
$UserRole.Name <> "VP Finance")




Please confirm if the Validation is ACTIVE.

Important :

If this is what you were looking for then please mark it as a "SOLUTION" orYou can Click on the "Like" Button if this was beneficial for you.

Thank You

All Answers

@anilbathula@@anilbathula@
Hi RajaShri,

The validation rule is correct and it works .
What is incomplete in this ?Are you getting any errors in saving this validation rule?

Thanks
Anil.B
Tushar sharmaTushar sharma
for picklist you can use this
if((ISPICKVAL(PRIORVALUE(Level__c),"Primary")&& isChanged(Level__c)), true, false)

now canged Lecel__c with your custom field and rimary as per your value
gautam_singhgautam_singh
Hi, 

This works correctly ! 

AND(
ISCHANGED(gautamsingh__testCheckbox__c),
$UserRole.Name <> "VP Finance")




Please confirm if the Validation is ACTIVE.

Important :

If this is what you were looking for then please mark it as a "SOLUTION" orYou can Click on the "Like" Button if this was beneficial for you.

Thank You
This was selected as the best answer
PrasadVRPrasadVR
Hi ,

your validation rule is Correct , It has to work . are you geeting any error /Is it not working as expected