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
M.A.M.A. 

Only want to have system administrators be able to update a particular field

Hi, 

 

I set a validation code $User.Alias <> 'CCE'  so that our adminstrator could only update the custom field we made: Account_Unique_ID.

 

Basically, we don't want regular system users to be able to update this field, only our system admin. Can someone please help.

 

Thanks.



Best Answer chosen by Admin (Salesforce Developers) 
IspitaIspita

Hi,

Please try the following:-

 

if($User.Alias <> 'CCE', if(PriorValue(Account_Unique_ID) <> Account_Unique_ID, true,false), false)

 

Assuming Administrator  have Alias 'CCE'

 

 

Hope this helps...

All Answers

IspitaIspita

Hi,

Please try the following:-

 

if($User.Alias <> 'CCE', if(PriorValue(Account_Unique_ID) <> Account_Unique_ID, true,false), false)

 

Assuming Administrator  have Alias 'CCE'

 

 

Hope this helps...

This was selected as the best answer
M.A.M.A.

THANK YOU, THANK YOU, THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  :smileyvery-happy:

IspitaIspita

If it solved your issue please mark it as a solution for the benefit of the SFDC community.

M.A.M.A.

I've marked it as a solution. 

 

Thank you again!

IspitaIspita

Anytime  ...  :)