function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ShayKhanShayKhan 

Restricting Users with a Sales Rep profile to use a particular value from a pick-list field.

Hello All!
I have a requirement where i have to restrict a value called "Upsell - New Term" from field called "Type" (Picklist). 

A few criterea will be going into this; 
1) I will need to allow the Sales Reps to make edits when the Type is already been selected as "Upsell - New Term". 
2) i Will need to make sure admin/delegated admin (Two different profiles) are exempt from this validation rule.  

This is what i have so far: 
And($Profile.Id!='00eo0000000rxvI',$Profile.Id!='00e1N000000h0wX', ISPICKVAL(Type,'Upsell - New Term'),ISCHANGED(Type))

But for some reason this does not seem to work for some of the users. Is there an alternate way i can go about this? 

Thanks!
Best Answer chosen by ShayKhan
Maharajan CMaharajan C
Hi,

Try the below one:

AND( ISPICKVAL(Type,'Upsell - New Term'),
ISCHANGED(Type),
AND($Profile.Id <> "00eo0000000rxvI",$Profile.Id <> "00e1N000000h0wX") )

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!


Thanks,
Raj

All Answers

MagulanDuraipandianMagulanDuraipandian
Use $Profile.Name <> 'Profile Name' instead of id.

--
Magulan Duraipandian
www.infallibletechie.com
Maharajan CMaharajan C
Hi,

Try the below one:

AND( ISPICKVAL(Type,'Upsell - New Term'),
ISCHANGED(Type),
AND($Profile.Id <> "00eo0000000rxvI",$Profile.Id <> "00e1N000000h0wX") )

Can you please Let me know if it helps or not!!!

If it helps don't forget to mark this as a best answer!!!


Thanks,
Raj
This was selected as the best answer
ShayKhanShayKhan
Thanks guys! 

@Magulan - Thanks, for your help.

@Raj the VR i have posted is similar to the one that you've posted on the actual post. The issue i am having is that when a New opportunity is created, Sales rep are able to select Type : Upsell - New Term