0

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?

  • Lightning or classic? – Hengky Ilawan May 27 at 15:24
  • Salesforce lightning – nSv23 May 27 at 15:33
1

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:

  1. Create two Quick Actions (Update Record) in your Lead object. Eg. Update Country Canada and Update 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.
  2. Edit your Lead record page, add two Related Record components, specify the Update Action to each quick action respectively.
  3. Set the Component Visibility of the Related Record components based on the country, eg. Country = 'Canada'
  4. Edit your page layout, remove the country-specific fields from the page layout. Leave only the common field.

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.