Skip to main content
CRMSalesforce CRM

Salesforce.com – Advanced validation using roles

By August 1, 2017No 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.

Corey Babka

Author Corey Babka

More posts by Corey Babka

Leave a Reply

5 Great Alternatives to SalesForce.com

Free Whitepaper Download

Learn more about 5 options that are better CRMs for small business

DOWNLOAD WHITEPAPER

Skip to content