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
Sudhir NarayanswamySudhir Narayanswamy 

How to add pick list condition in formula

Hi,
   I have a requirement with pick list values 

   Record Type Record_Type_Name__c = ( Partner, Forti User, End User)
  
   profile 1 = 00e340000011weF
   profile 2 = 00e30000000boI5
   User 1 = 00534000008Rauz

 Here Profile 1 and 2 are only allowed to change picklist values other than this no one is allowed to change.
 User 1 is allowed to change only pick list Record_Type_Name__c  value from  (Forti User to End User) other than this he is not allowed to change.
 
 Please suggest me how to add this condition in salesforce formula

Thanks
Sudhir
 
Lokesh KumarLokesh Kumar
This is something you want to restrict hence you have to go for validation rule. by putting all these conditions, assuming you know the validation rule.

-Lokesh
Sudhir NarayanswamySudhir Narayanswamy
Hi Lokesh,

  I know the validation rule how do you want me to put can you show me a sample of one ill do the rest

Thanks
Suhdir
Arpit Jain7Arpit Jain7
Hi Sudhir,

Your validation rule will look like below

AND($Profile.Id !='00e340000011weF',$Profile.Id !='00e30000000boI5',OR( ($User.Id ='00534000008Rauz'  &&  ISCHANGED(Record_Type_Name__c)  &&  NOT(ISPICKVAL(Record_Type_Name__c, 'End User')) &&  Text(PRIORVALUE(Record_Type_Name__c))<>'Forti User'), ($User.Id !='00534000008Rauz'  && ISCHANGED(Record_Type_Name__c) )))

You can make necessary change as per your actual requirement.

Hope it helps !!

Thanks
Arpit