n w    w w w w

baner
You are here:   Home FAQ's CRM On Demand Locked fields from change for specific usergroups
large small default
Locked fields from change for specific usergroups
User Rating: / 1
PoorBest 

A customer asked me about making an opportunity read-only to users except some admin users. Based on if they 'lock' the record or not. Initially I thought about creating a layout with read-only values and add that into the dynamic layout list. But that would mean I would have to create a new 'opportunity type' something like 'Services – Locked', for each different opportunity type I already had. Not good as it stuffs up all the reporting and lists that use the opportunity type.

So instead here is an idea that has a bit more maintenance but works just as well.

  1. Create a 'locked' checkbox and place on the layout an admin person can access.

  2. Add a field validation that tests that 'locked' custom field

      The expression would look something like below

[<bLocked_ITAG>]="N" OR UserValue('<Role>')=”Administrator”

You can see I am also testing the role, with an OR statement, that way a certain group of users are exempt from the locking. I have tested this by Role, but you could use any field on the user record including a custom field, to control at a user level who can have access to change locked records.

  1. Once you have the expression you need to add that to each field on the record in the field validation(the high maintenance bit :(), and stick an error message too.

You should end up with something like this;