Skip to main content

Create Easy Access to the Activation Flow

Learning Objectives

After completing this unit, you'll be able to:

  • Explain why you might want to use a Lightning app page to activate a permission set.
  • Create a Lightning app page that references a flow.
  • Run a flow from a Lightning app page to activate a session-based permission set.

Follow Along with Trail Together

Want to follow along with an expert as you work through this step? Take a look at this video, part of the Trail Together series.

(This clip starts at the 30:49 minute mark, in case you want to rewind and watch the beginning of the step again.)

Accessibility

This unit requires some additional instructions for screen reader users. To access a detailed screen reader version of this unit, click the link below.

Open Trailhead screen reader instructions.

Why Use a Lightning App Page?

In the previous units, you created a session-based permission set, activated it using a flow, and assigned the permission set to Lynda Herman. If we stop here, you could have users run your flow to activate the permission set for themselves. However, this can be awkward and isn’t very user-friendly. Most hiring managers don’t need to run flows in our scenario, and they might not have permission to run them.

You can use some simple Visualforce markup and create a custom tab to run your flow. In fact, you might have already used Visualforce in the past. But if you want to make things even easier on yourself, we recommend using a Lightning app page. Why? First, there’s no need to write any markup. None! Then, there are fewer steps to complete your work. Hopefully these are good enough reasons, but let’s start the process so you can see for yourself.

  1. From Setup, enter Builder in the Quick Find box, then select Lightning App Builder.
  2. Click New and select App Page then click Next.
  3. Name your page Activate Temp Access Flow and click Next.
  4. Select One Region and click Done.
  5. Drag the Flow component onto your canvas, and for Flow, select Activate Contracts Access as a Screen Flow. (It may already be selected.)
  6. Click Save and select Activate.
  7. On the Activation window, select Lightning Experience. Under Add to Lightning Apps, click Sales, and then click Add page to app. Click Save.
  8. Save your work and click Back to exit Lightning App Builder.

What we just did is make the flow that activates your permission set easy to access via a Lightning component. In the Sales app, you can see the tab:

Activate Temp Access Flow tab visible in the Sales App.

All hiring managers need to do to activate the Employment Contracts Access permission set for themselves is select Activate Temp Access Flow. Once the tab is selected, the flow begins running in the background. When completed, a message displays that the flow has finished running. The hiring manager now has read, create, edit, and delete access during the current session.

Test Your Work

Let’s test everything that you’ve done now.

  1. Log in as Lynda Herman.
  2. Search for Contracts and select it. You shouldn’t be able to edit or create contracts.
  3. In the Sales app, click Activate Temp Access Flow. You should see a message stating that your flow finished.
  4. Search for Contracts again and select it. You should see the New button on the page, which allows you to create a new contract. If you click on a contract, you should be able to edit it.
Note

If the New button doesn’t appear, try refreshing your screen or switching to Salesforce Classic and then back to Lightning Experience.

Resources

Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback