Creating a custom permission 

Let's look at a business scenario. Suppose that Helina Jolly is working as a system administrator at Universal Containers. She has received a requirement from the management to auto-update the related open opportunities status to Closed Lost if the out of business checkbox is checked on the account record. The management also wants to make sure that this process will not work for the system administrator and supply chain user profiles.

Using custom permissions, you can grant users access to custom apps. In Salesforce, you can use custom permissions to check which users can access a certain functionality. Custom permissions let you define access checks that can be assigned to users via permission sets or profiles, similar to how you assign user permissions and other access settings. We will now create a custom permission to bypass processes. Perform the following steps to create a custom permission:

  1. Navigate to Setup (gear icon) | Setup | PLATFORM TOOLS | Custom CodeCustom Permission and click on the New button; it will redirect you to a new window, where you will have to enter the following details:
    • Label: Enter an easily identifiable term to recognize this custom permission. In this case, use By Pass Process Builder.
    • Name: This will be auto-populated, based on the Label.
    • Description: Write some meaningful text, so that other developers or administrators can easily understand why this custom permission was created.

The Custom Permission page will look as follows:

  1. Once you are done, click on the Save button.
    1. To assign a custom permission to a profile (you can also assign it to a permission set), navigate to Setup (gear icon) | SetupUsers | Profiles, and open the Supply Chain User profile (create a profile using the Salesforce license type, with the name Supply Chain User, if you haven't created it yet).
    2. Navigate to Apps | Custom Permission.
    3. Open the custom permission, and click on the Edit button.
    1. Then, assign the By Pass Process Builder custom permission to the profile, as shown in the following screenshot:
    1. Once you are done, click on the Save button.
      1. Repeat step 3 to assign the custom permission to the system administrator profile.
      ..................Content has been hidden....................

      You can't read the all page of ebook, please click here login for view all page.
      Reset
      3.128.199.175