Loading

Make a Custom Button in Salesforce Record Pages Visible Only to Particular Users

Veröffentlichungsdatum: Oct 11, 2026
Beschreibung

A System Administrator has created a custom button on a Salesforce record page and wants it to be visible only to System Administrator users. No other users should be able to see or access this button on the record page.

Lösung

This article explains how to make a custom button visible only to specific users in Salesforce, using either the built-in Dynamic Actions feature or a formula-based workaround.

Official Feature: Dynamic Actions

This feature, previously a request in Idea Exchange titled Limit the Visibility of a Custom Button Based on Profile, is now generally available for Custom Objects and in Beta for Standard Objects.

To learn more about this feature, review Create Dynamic Actions in Lightning App Builder in Additional Resources.

Workaround: Formula Field with HYPERLINK

The formula workaround is also still an option. Because users are related to a Profile, you can use a formula to restrict access to a specific profile.

Create a formula field and use the HYPERLINK function to conditionally display the link. You can add an image to the hyperlink so that it looks like a button. For example, the following formula displays the Google hyperlink to "System Administrator" users only:

IF(CONTAINS($Profile.Name, "System Administrator"), HYPERLINK("http://www.google.com/","Button name")," ")

This formula checks whether the user's profile name contains "System Administrator". If it does, the formula shows a link labeled "Button name". Otherwise, the formula returns a blank value. No other user is able to see the "button" (image).

Note: Support for buttons and formulas is limited. See Scope of Support for Buttons and Scope of Support for Formulas in Additional Resources for more information.

Nummer des Knowledge-Artikels

000386498

 
Laden
Salesforce Help | Article