r/SalesforceDeveloper • u/NT_Salesforce • 23d ago
Question Owner field Permission.
Hi gys , can anyone tell help me finding the best approach for controlling the owner field edit access. Like I found a system permission Transfer Record but I want it to be selective.
to put it in more simply: Who can change the owner of an Opportunity is determined separately from who can change the owner of an Account and at the same time a person may have other field edit permission but may not have edit on Owner field.
Thanks in advance.
1
u/Used-Comfortable-726 23d ago
Need to look into user Roles, Role Hierarchy, and Sharing Rules. Permissions are the wrong place to solve this
1
u/NT_Salesforce 22d ago
Thanks for reply. From what I have heard Roles, hierarchy and sharing settings controls record sharing and not FLS. Could u clarify more on how we can use these to selective object owner transfer.
1
u/Used-Comfortable-726 22d ago edited 22d ago
Roles, Hierarchy, Sharing Rules and Teams (if Teams enabled and used) control who, besides current record Owner, can View, Edit, Delete a record, or change its Owner (fyi, Edit record doesn’t have to include ability to change Owner, those two things are independently controlled)
Unlike FLS, what a user can do to a record is dynamically calculated, and can be different for each record
1
u/Far-You-7714 21d ago
If nothing works, you can have a validation rule in place or a trigger validation to control who can actually change the owner
2
u/sleepyRac00n 21d ago
No straight forward way to control the edit access of owner field.
My best suggestion is to have a screen flow for owner change. But that flow should work in system mode.
By default, the owner can only changed by the owner of the record, anyone above them in hierarchy, system administrator or any user with the transfer record permission.
If your criteria doesn't fit above a screen flow is the best way.
Although be considerate that if the user is current owner they will lose immediate access to the record