0

I was trying to write a validation rule , but it is not reflecting which I expected. There is a pick-list field having 6 values namely active, processing, accepted,rejected, admitted, discharge. Once the pick-list value has been saved as admitted we need to lock down this value for all users except system admin user.

I have been struck for the below validation rule. Can you please guide.

AND(
 PRIORVALUE(Status) = "Admitted", 
 NOT($User.Id = "005P00000015Vvm"),
 ISCHANGED(Status)
)

Thanks in advance.

3
  • so what is not working. Your rule looks correct. Oct 5, 2017 at 8:22
  • but it is not firing, I dont know why
    – Prakash
    Oct 5, 2017 at 8:25
  • Have you activated the rule? Oct 5, 2017 at 8:34

1 Answer 1

0

You can achieve this in multiple ways.

  1. One of them is, you can change the record type to a Locked Type and assign a page layout where you don't allow the picklist to be edited further.
  2. For the method that you are using you need to change the rule to this:

    AND(ISPICKVAL(PRIORVALUE(Status),"Admitted"),
    ISCHANGED(Status),NOT($Profile.Name = "System Administrator"))
    

You shouldn't hardcode the Ids in rules/code. Those might differ in other orgs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .