Hands on 3 - setting the Login Flow finish behavior

Just as Salesforce allows us to setfinish or redirect URL for the Flow whenever we embed it in a custom button/link or a Visualforce page, likewise, Login Flows allow us to set the finish location and the force logout URL.

Let's look at a business scenario. Helina Jolly is working as a system administrator at Universal Containers and she has created a Login Flow to display the event detail to users after successful login. She has received another requirement to set the finish location. Currently, after clicking on the Finish button, it redirects users to their respective landing page, but the business wants to redirect these users to the Sales Executive Chatter group, which we created in Chapter 5, Developing Applications with Process Builder.

It's very easy to set the finish location and force logout URL. Perform the following steps to set this in motion:

  1. First of all, navigate to the Sales Executive Chatter group and copy the URL; it will look like the following URL:

https://gs0.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9B0000000CyPe

  1. In the Lightning Experience, navigate to Setup (Gear Icon) | Setup | PLATFORM TOOLS | Process Automation | Flows and open the Display message after login Flow that we just created for the previous use case.
  2. To set the finish location, create a Text variable, LoginFlow_FinishLocation, set Input/Output Type as Input and Output, and for Default Value, use the Sales Executive Chatter group's URL, as shown in the following screenshot:

The variable name is very important because this is a "reserved" name, or a "special" variable name, that has built-in functionality. Make sure that you have used the same variable name as the one shown in the preceding screenshot.

  1. Once you are done, click on the OK button.
  2. The next step is to save the changes; as Flow is already activated, save it as New Version. Once you are done, close the canvas and activate the latest version.

Now, after clicking on the Finish button in Login Flow, it will redirect the users to the Sales Executive Chatter group.

For force logout, users create a Boolean variable with the name LoginFlow_ForceLogout and set it to true.

You can't redirect your users to a URL that is external to your Salesforce organization.

..................Content has been hidden....................

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