Loading

How to Reference a Custom Permission in a Formula, Workflow Rule, or Validation Rule in Salesforce

Veröffentlichungsdatum: Jul 2, 2026
Beschreibung

Custom Permission Sets cannot be referenced directly in a Formula, Workflow Rule, or Validation Rule. However, you can use a Custom Permission as a global variable ($Permission.Custom_Permission_Name) to achieve the same result. This article explains how to create the Custom Permission, add it to a Permission Set, and then reference it in your automation rule.

Lösung

 

In Salesforce, Custom Permission Sets cannot be directly referenced in Formulas, Workflow Rules, or Validation Rules. However, you can use a Custom Permission as a global variable using the format $Permission.Custom_Permission_Name to achieve this. Follow the steps below.

Step 1: Create the Custom Permission Set

  1. Click Setup.
  2. In the Quick Find / Search box, type Permission Sets.
  3. Click Permission Sets.
  4. Click New.
  5. Add a Label (your preference) and an API Name (automatically populates).
  6. Click Save.

Step 2: Create a Custom Permission

Create a Custom Permission with the same name as the Custom Permission Set.

  1. Click Setup.
  2. In the Quick Find / Search box, type Custom Permission.
  3. Click Custom Permissions.
  4. Click New.
  5. Add a Label (your preference) and a Name (automatically populates).
  6. Click Save.

Step 3: Add the Custom Permission to the Custom Permission Set

  1. Click Setup.
  2. In the Quick Find / Search box, type Permission Sets.
  3. Click Permission Sets.
  4. Select the Permission Set you created.
  5. Click Custom Permissions.
  6. Click Edit.
  7. Select the Custom Permission from the Available Custom Permissions list and click Add to move it to Enabled Custom Permissions.
  8. Click Save.

Step 4: Reference the Custom Permission in Your Rule

In the formula editor for your Validation Rule or Workflow Rule:

  1. Open the formula editor.
  2. Click the Insert Field button.
  3. Select Permission.
  4. Select the Custom Permission name, then click Insert.

The formula syntax is: $Permission.Custom_Permission_Name

 

Nummer des Knowledge-Artikels

000386266

 
Laden
Salesforce Help | Article