Hide the Glance Component for Users Without Glance Access

Step-by-step guide to configuring Salesforce Lightning Component visibility filters to hide Glance buttons from users lacking permission sets.

When a user without a Glance permission set accesses a Lightning Record Page with the Glance Component on it, they will see a message about Glance not being enabled. You can optionally hide this message by using a visibility filter on the Glance Component.

To set visibility filters that leverage the Glance permission sets:

  1. Navigate to the object where the Glance buttons are displayed. For example, a Contact.

  2. From the Gear Icon, click Edit Page.

  3. Select the Glance component within the page. Under Set Component Visibility, click Add Filter.

    Add Filter under Set Component Visibility in Salesforce Lightning App Builder

  4. Under Advanced, click Select.

    Select Advanced filter type

  5. Choose Permissions > Custom Permissions > Glance.View_Glance_Buttons and then click Done.

    Select the Glance.View_Glance_Buttons custom permission

  6. Set Operator to Equal and Value to True, and then click Done.

    Set Operator to Equal and Value to True

  7. Click Save and Activate the page.

  8. Users without the Glance permission set will no longer see the Glance icon and warning message on the page.

  9. If a user sees an error that Glance is not enabled, then navigate to the user's Profile, edit the Custom Permissions, and disable the custom permissions related to Glance at the profile level. Ask the user to refresh the page.

    Disable custom permissions related to Glance at the profile level