I have created sharing rules based on user roles where members of the same roles can view and edit each other's records. However there are two lookup fields (Accounts and Product) that I would not want within the record to be edited by the non record owner (my object is private). I understand formula and lookup fields cannot be inserted by a criteria sharing rule. How can I then achieve this?
Manoj Nambirajan (Dell Technologies) Forum Ambassador
Once you open record visibility via sharing rules.. the next step to restrict the data edits.. can be via validation rules.
You can have a rule like..
$user.id <> Ownerid && (ISCHANGED(Lookup_field1__c) || ISCHANGED(Lookup_field2__c))
Here we check if current user is NOT record owner AND one of the lookup fields are updated.. prevent it via validation rule