0

I am trying to restrict certain users to restrict changing few picklist values, But they are still able to change the picklist.

AND(
    RecordType.Name ='Banker',  $UserRole.Name = 'Executive', ISCHANGED(StageName__c),
    OR(
ISPICKVAL(PRIORVALUE(StageName__c), 'Reviewing'),
ISPICKVAL(PRIORVALUE(StageName__c), 'Required Docs')
)
)

But the user with Executive Role can still change the stageName picklist to reviewing, can someone let me know where am I going wrong, thanks.

1 Answer 1

2

Your validation rule is set up to prevent changing the StageName__c field away from "Reviewing" or "Required Docs". If you want to impede changing to those stages, you don't need PRIORVALUE(), which is providing the value of the field prior to the change that's being attempted.

2
  • Ok, so I removed the PriorValue function, but the user can still change the Picklist to Reviewing May 1, 2018 at 23:25
  • Ahh, this is silly I was entering incorrect Role Name. It is working now!!! Thank you @DavidReed May 1, 2018 at 23:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.