+ Start a Discussion
Anthony DiGangi 5Anthony DiGangi 5 

How to lock down changing of picklist values by profile?

I have a field accessibly by Sales and Sales Ops.  Sales should not be able to change the field once they have selected 100% but Sales Ops needs to be able to edit the field and move the percent to 90%.  Can you use "Custom Permissions" if so what would the code for the "Validation rule need to be?"  The Object is "Opportunity" the field is "Sales Stage" which has a dependent field "Probability."
Best Answer chosen by Anthony DiGangi 5
Keena FloodKeena Flood
Hi Anthony sorry I thought I replied.  Yes please create two separate profiles to segment access as detailed above. Please let me know if you need further assistance! =)

All Answers

Keena FloodKeena Flood
Hi Anthony,

Utilizing the following formula will enable you to fire a VR when someone not in the specified Profile attempts to edit a Opporunity record which has been closed.

AND(
IsClosed,
PRIORVALUE(IsClosed),
 $User.ProfileId <>'Profile_ID')

Let me know how I can be of further assistance.  If this meets your requirement please hit that BEST ANSWER button! =))
Anthony DiGangi 5Anthony DiGangi 5
Keena, Thanks for getting back to me so quickly and providing the information. I am not a coder and am trying to learn and improve my skillset. My lack of experience in coding shows in my explanation of the scenario and whether I give sufficient detail for a solution. I just wanted to make sure that I asked the right question and provided the appropriate information. Does the code you provide specify the field that I want to lock after it has been moved to 100%? How do I add the profiles that I want to lock out? How do I add the profile I want to be able to change this field?
Keena FloodKeena Flood
Anthony my pleasure.

1) The Validation Rule is placed directly on the field which you want the VR to fire on.  This your Use Case Click "Stage"

User-added image

2) Click the New button under Validation Rules section.
User-added image

3) Enter the Validation Rule details.  In your Use Case you only need to list the Profile ID you DONT want the Validation Rule to fire for.  You find the Profile ID by clicking on the Profile via the Setup > Manager Users > Profiles > [Click Profile of choice] > find ID in URL of Address Bar.

User-added image

User-added image
Shawn KurugantiShawn Kuruganti
Hey Anthony,

I think I know what you are trying to accomplish and Keena's response is helpful, but not exactly what you want. I am writing here now so I can keep track of this request while I solve your issue as I would like to know this for my own practice as well. Alternatively, you could probably create a process that causes an opportunity to close once this custom field equals 100% and then use Keena's validation rule to stop anyone but the 'Sales Ops' from editing the entire record.

Do you need the entire Opportunity closed to a Sales profile once that field hits 100% or just that specific field?

Will write back soon with an exact answer.

Thanks,
Shawn
Anthony DiGangi 5Anthony DiGangi 5
The issue that remains is this: Both Groups share the same profile…The group I want to be able to move the sales stage from 100 % to 90% and the group I do NOT want to be able to move it from 100% to 90%. I am considering creating a new profile and splitting these groups and then I can potentially use what you and Keena have provided. Does that sound logical?
Keena FloodKeena Flood
Hi Anthony.  Sounds like a logical plan of action to me.
Keena FloodKeena Flood
Anthony hope my answer meets your ask.  If so please hit that BEST ANSWER button! =))
Anthony DiGangi 5Anthony DiGangi 5
Keena, When I re-read my question. I left out a key piece of information. The two user groups share the same profile. I will need to create a new profile for one of the groups before I can utilize your help. Does that sound correct to you?
Shawn KurugantiShawn Kuruganti
Anthony,

I believe you will definitely need to separate the profiles to restrict one while allowing the other to keep its access. Once you have done this you should be able to create a validation rule that stops all profiles not equal to Sales Ops from edditing the field if it equals 100%. I still need to brush up on validation rules before I can give you the proper code for it, but perhaps this will get you started.  Anthony, if you know the code Keena needs to restrict access to a field that equals 100% from all profiles <> 'PROFILE NAME' feel free to jump in here.

Thanks,
Shawn
Keena FloodKeena Flood
Hi Anthony sorry I thought I replied.  Yes please create two separate profiles to segment access as detailed above. Please let me know if you need further assistance! =)
This was selected as the best answer