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
chandraprasanth Gchandraprasanth G 

Only record owner or admin can change a field on Account object.

Best Answer chosen by chandraprasanth G
AnkaiahAnkaiah (Salesforce Developers) 
Hi Chandraprasanth,

try with below validation rule.
 
AND 
( 
 NOT(ISNEW()), 
 OR( 
       $Profile.Name <>'System Administrator', 
       $User.Id <> OwnerId 
      )

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​
 

All Answers

AnkaiahAnkaiah (Salesforce Developers) 
Hi Chandraprasanth,

try with below validation rule.
 
AND 
( 
 NOT(ISNEW()), 
 OR( 
       $Profile.Name <>'System Administrator', 
       $User.Id <> OwnerId 
      )

If this helps, Please mark it as best answer.

Thanks!!​​​​​​​
 
This was selected as the best answer
mukesh guptamukesh gupta
Hi Chandra,

Please use below tested  validation rule:-
 
AND(NOT(ISNEW()),OR(OwnerId  <> $User.Id,$Profile.Name <> "System Administrator"))

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh
chandraprasanth Gchandraprasanth G
After creating a record with different user who is not admin.
Not even the system administrator can update that record except that owner.
AnkaiahAnkaiah (Salesforce Developers) 
If you want to modify only record owner then modify the formula as like below.
 
AND ( NOT(ISNEW()),  $User.Id <> OwnerId )

Thanks!!