Since then, I received several emails, from my readers, requesting me to show how to auto assign Permission Set to new users using Process Builder.
So, here it is! In this article, we will discuss how to assign a Permission Set to new users using Process Builder and Flow.
Salesforce allows you to add Permission Sets to users, to extend their functionalities without changing their profile. For example, if you want to grant Modify all access on Account objects to a set of users – without changing their profile or creating a new profile – then, consider using Permission Set.
Business Use case
Martin Jones is working as a System Administrator at Gurukul on Cloud (GoC). At GoC they have rolled out Lightning Experience for VP of Sales and VP of Marketing only. Martin has received a requirement to enable Lightning Experience for all new users and ensure that all new users undergo training on Lightning Experience.
Solution for the above business requirement
To solve this requirement we will use Visual Workflow and Process Builder. (#1) Process builder will fire when a new user gets setup and it will trigger the Flow. (#2) Visual Workflow will add permission set to the new user. Before proceeding ahead, you have to understand PermissionSetAssignment (It represents an association between a User and a PermissionSet) objects in Salesforce.
|AssigneeId||ID of the user to assign the permission set.|
|PermissionSetId||ID of the PermissionSet to assign to the user.|
- First of all, we will create a new permission set called Lightning Experience.
- Then assign the Lightning Experience User system permission to it.
- The next step is to grab the permission set Id, as shown in the following screenshot: The above screenshot shows how to grab Permission Set ID using Developer Console. Now, we need to create a Custom Label to store the aforementioned Permission Set Id. Read the rest of this entry!