To understand how to solve the same business use case using Process Builder and Salesforce Flow. Check out this article Getting Started with Process Builder – Part 78 (Auto Enable Lightning Experience for New Users).
Big Idea or Enduring Question:
- How can you use Flow to automatically assign permission sets to new users?
Objectives:
After reading this blog post, the reader will be able to:
- Use After-save Record-Triggered Flow to assign permission sets to new users
- Best practice to refer Permission Set into Record-Triggered Flow
- Use a Decision element to find – record variable or record collection variable contains a record or not
- Use After-save Record-Triggered Flow to create a record
Business Use case
Brenda David is a System Administrator at Universal Containers (UC). She has received a requirement to auto-assign Two Factor Authentication permission set to the new users.
Automation Champion Approach (I-do):
Salesforce allows you to add Permission Sets to the User to extend the user’s functional access without changing their profile. For example, you can grant Modify All access to the Account object to a set of users without changing their profile or creating a new profile.
This is a basic use case to start with the lightning flow. To solve the above requirement, we will use the After-save Record-Triggered Flow.
Before proceeding, you have to understand the PermissionSetAssignment objects in Salesforce.
- PermissionSetAssignment:- This object represents an association between a User and a PermissionSet.
Field Name | Details |
AssigneeId | ID of the user to assign the permission set. |
PermissionSetId | ID of the PermissionSet to assign to the user. |
Before discussing the solution, let me show you a diagram of a Process Flow at a high level. Please spend a few minutes to go through the following Flow diagram and understand it. Let’s begin building this automation process. Read the rest of this entry!