Filter the component visibility with form factor phone

Implementing home page for different set of users based on their profile or app – profile can be done directly while activating the page. Also, assigning the Home page to the set of users based on values in their User record or other related records can be done by setting the component visibility and custom permission. Let us discuss more on how to build the home page for different users.

Implementing home page for different set of users based on their profile or app – profile can be done directly while activating the page. Also, assigning the Home page to the set of users based on values in their User record or other related records can be done by setting the component visibility and custom permission. Let us discuss more on how to build the home page for different users. 

Home Page can be assigned as 

  • Org default: Assigned for all the users in the org. 
  • Apps and App – profile:  Assigned to different apps and app with the selected profiles 

Filter the component visibility with form factor phone

If we want to show different set of components in Home page for different users, we can use ‘Set component visibility’ feature in lightning App Builder page to show or hide the component in home page. 

Set component visibility: 

Visibility for the component can be set based on  

  • Logged in User record fields 
  • Custom Permission 

Filter the component visibility with form factor phone
 

Using User record to set component visibility 

  • Choose the component in the Lightning Home Page builder and select set component visibility from left panel 
  • Click add filter –> Choose Field –> User –> Choose field required to filter (for Ex: Role) 
  • Provide the value for filter (for Ex: Admin)  
  • Activate the Page for the app or app – profile 

Using Custom permission to set component visibility 

Step 1: Create Custom Permission 

Setup –> Custom Permission –> New 

Enter the permission information: 

  • Label – the permission label that appears in permission sets 
  • Name – the unique name that is used by the API and managed packages 
  • Description – optionally, a description that explains what functions the permission grants access to 
  • Connected App – optionally, the connected app that is associated with this permission 
  • Click Save 

Step 2: Enable the custom permission to Permission set 

  • Create new Permission Set or choose an existing one for which you want to enable the custom permission 
  • In App section –> Choose Custom Permission to include the custom permission in Permission Set 
  • Select the available custom permission that needs to be enabled for permission set and then click Save 
  • Assign the permission set to the group of users who needs by clicking Manage Assignment 

Filter the component visibility with form factor phone
  

Use this Custom permission in Lightning Home Page to set visibility: 

  • Choose the component in the Lightning Home Page builder and select set component visibility from left panel 
  • Click add filter –> Choose Field –> Permission –> Choose Custom Permission 
  • Select the custom permission that created for set of users 
  • In criteria, choose the value true or false based on your use case — whether to show or hide the selected component 
  • Activate the Page for the app or app – profile 

For Reference: 

  • https://help.salesforce.com/articleView?id=admin_home_lex_intro.htm&type=5 
  • https://help.salesforce.com/articleView?id=perm_sets_custom_perms.htm&r=https%3A%2F%2Fwww.google.com%2F&type=5 

Filter the component visibility with form factor phone

Chola Dharanika Anbarasu

About MST

At MST Solutions our cornerstone is to adapt, engage and create solutions which guarantee the success of our clients. The talent of our team and experiences in varied business verticals gives us an advantage over other competitors.

Facebook-f Twitter Linkedin

Recent Articles

Web-to-Case form with custom field look up UI

INTRODUCTION:  This article gives a solution to have look up field UI on the community page form using JavaScript. Both logged in users and public

Read Article »

LWC Testing with Jest Framework 

Jest is a JavaScript testing Framework which focuses on simplicity. It works with Babel, TypeScript, Node, React, Angular, Vue, and more projects. Jest tests are

Read Article »

Work with us.

Our people aren’t just employees, they are key to the success of our business. We recognize the strengths of each individual and allow them time and resources to further develop those skills, crafting a culture of leaders who are passionate about where they are going within our organization.

What is true for component visibility in lightning experience?

Component visibility properties appear when you select a component on a record page in the Lightning App Builder. This is true for standard components, custom components, and components from the AppExchange. No need to add anything to your custom components. It's all handled by the Lightning App Builder.

Where is component visibility Salesforce?

Once in the Salesforce Lightning page builder layout, click on the component you want to make dynamic to bring up its configuration options on the right-hand side of the screen. This is where you will find the “Set Component Visibility” settings for your component (see screenshot).

What is field section component in Salesforce?

Field Section components are desktop-only and don't appear when the page is viewed on a phone. You can use one Lightning page for both desktop and phone. Add the Record Detail - Mobile component to the same page with your Field Section components.