Skip to main content
how to redirect user to experience cloud specfic tab when user click on Screen flow finish button
1 件の回答
  1. 2023年5月24日 14:46
    Hello ,

    To redirect a user to a specific tab in Experience Cloud when they click on a Screen Flow finish button, you can utilize the lightning/navigation component in Salesforce. Here's an example of how you can achieve this:

    Add the lightning/navigation component to your Screen Flow finish button.

    This component allows you to navigate to specific locations within Experience Cloud.

    Determine the URL of the specific tab you want to redirect the user to. You can find the URL by navigating to the desired tab in Experience Cloud and copying the URL from the browser's address bar. The URL should include a unique identifier for the tab.

    Modify the Screen Flow finish button's configuration to include the lightning/navigation component. Set the pageReference attribute of the component to the URL of the desired tab.

    Here's an example of how the Screen Flow finish button's configuration might look:

    <aura:component>

        <aura:attribute name="pageReference" type="Object"/>

        

        <lightning:navigation aura:id="navService"/>

        

        <lightning:button label="Finish" onclick="{!c.redirectToTab}"/>

    </aura:component>

    In the corresponding controller JavaScript file, handle the button click event and perform the redirection using the lightning/navigation component. Here's an example:

    ({

        redirectToTab: function(component, event, helper) {

            var navService = component.find("navService");

            var pageReference = {

                "type": "standard__webPage",

                "attributes": {

                    "url": "<URL_OF_SPECIFIC_TAB>"

                }

            };

            

            navService.navigate(pageReference);

        }

    })

    Replace <URL_OF_SPECIFIC_TAB> with the URL you obtained in Step 2.

    Reference -> https://salesforce-flowsome.com/how-to-redirect-users-returl/

    https://salesforce.stackexchange.com/questions/295725/navigation-and-pagereference-in-lightning-component-why-is-url-void

    Help video -> https://www.youtube.com/watch?v=Z3lZwPLsGcc (https://salesforce-flowsome.com/how-to-redirect-users-returl/)

    If this helps , please mark this as Best Answer.

    Thank you.

     
0/9000