I have a profile called sales agent and 2 users with this profile, 1 from Canada another from US(the user object has a custom picklist field called Country). Now if the US sales agent created a Lead, I want the sales agent from Canada to only view this lead but only certain fields.
I am thinking of 2 page layouts, one normal another read only with limited number of fields and using record type, but how do I do this is Canada and US sales agent have the same profile?
Best Answer
It is not possible to assign two different page layouts to the same profile.
But with Salesforce Lightning, at least there is a way to achieve this by using Related Record component and the Component Visibility setting in the Lightning Record Page.
What you need to do:
Update Country Canada
andUpdate Country US
. You can add the country-specific fields that you want to show only when Country is Canada in one Quick Action, and other fields on the other Quick Action.That's it!
With the future Dynamic Forms feature (only available in Pre-Release org as of now), this workaround is not needed. See Dynamic Forms.
The other possible solution is to disable the View access on the Field Level Security, and create two permission sets and assign them to the users based on the country.