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.
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.
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.
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.
000386498

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.