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
Matt FolgerMatt Folger 

How to prevent someone from editing a field unless they own the record

Thought that Validation Rules and then Process builder would have the answer here, but I'm not finding the system-wide variable for "Current User" as a valid option for either of those systems so I'm not sure how to set this up.

I have an object that Sales has access to and they can edit a specific field "Recommended to", however I only want them to be able to edit that field when they are the specific record owner.  These records might change owner over and over again in their life-cycle and I wanted to restrict the ability to change that field only to who presently owned it.  Hope I do this with something other than having to scrap the Page Views and put in manual Visualforce code!
Best Answer chosen by Matt Folger
jigarshahjigarshah
Matt,

You could use the following validation rule to accomplish this.
$User.Id <> OwnerId

The above stated validation rule fires when the currently logged in User's Id who is accessing the record is not the same as the Reocrd's OwnerId field value. 

All Answers

jigarshahjigarshah
Matt,

You could use the following validation rule to accomplish this.
$User.Id <> OwnerId

The above stated validation rule fires when the currently logged in User's Id who is accessing the record is not the same as the Reocrd's OwnerId field value. 
This was selected as the best answer
Matt FolgerMatt Folger
Worked great!