Corey Babka No Comments

Had a client recently that wanted to lock down a field based on role, but also depending on what the account type field was.  For instance, reps could edit a prospects address but not a customer.  Normally you would use field level security based on role, but because of that added item of account type, it’s a bit more than that.

So, what we did was use a validation rule on the city, state, street, and zip fields, where if those fields were changed, and the role was a rep, and the account type was a customer, the save would fail with a warning.  Here’s what I did:

Go to the setup, do a quick find for “validation” and look at the account validation rules.  Click New when you’re there.

We want to create something like this:

Once done and saved, if you have the role of sales rep and you try to change one of those fields on a customer, you’ll get a prompt to see the administrator.  What’s important to note is teh $UserRole field which is one of those strange fields you can use in formulas.  They’re used mostly to identify who the logged in user is, their role, etc.

Leave a Reply

Your email address will not be published. Required fields are marked *