We are aware of permission sets and also how it is helpful in Salesforce. But are we know what is session-based permission set and how can we activate this session-based permission set for a user without any coding? Yes, we can do it through the declarative approach that is Flow. We are going to learn here how to Activate Session-Based Permission Set through Flow.
Follow this example.
Step-1 Clone Read Only profile named it “Read Only Clone”.
Step-2 Before Save give Run Flows permission.
Step-3 Create user named Lynda Herman.
Step-4 Assign Read Only Clone profile to Lynda Herman.
Step-5 Create a permission set same as showing in below image.
Step-6 In this Temporary Account Edit permission set give access Modify All to Account object.
Step-7 Now assign this permission set to Lynda.
Step-8 Create the flow now which can dynamically activate this session-based permission set.
Step-9 From Set up Quick Find Box enter Builder. Select Lightning App Builder.
Step-10 Click New and select App Page then click Next.
Step-11 Name page as Activate Temp Access Flow and click Next.
Step-12 Select One Region and click Finish.
Step-13 Drag the Flow component onto canvas, and for Flow, select Activate Account Access. (It not selected already.)
Step-14 Click Save and select Activate.
Step-15 On the Activation window, select Lightning Experience and for Lightning Apps add Sales.
Step-16 Save and click Back to exit Lightning App Builder.
Read More on Session-Based Permission Set>>