0

I have a Detail Page Button that calls a Visualforce page, from a Lightning Experience Service Console.

However, I can not get the finishLocation to resolve in the Lightning Experience UI.

This code below returns me to the case record within the Service Console (good), but the case is rendered in Classic UI (bad), while the rest of the Service Console is Lightning Experience.

Does anyone know the correct syntax to resolve in Lightning Experience?

<apex:page standardController="Case" tabStyle="Case" >
    <flow:interview name="Take_Case" finishLocation="{!URLFOR('/'+Case.Id)}" >
        <apex:param name="recordId" value="{!Case.Id}" />
        <apex:param name="userId" value="{!$User.Id}"/>
    </flow:interview>
</apex:page>
  • 2
    Have you tried {!URLFOR($Action.Case.View, Case.Id, null, true)} instead? – sfdcfox Sep 20 '17 at 22:21
  • That still resolves in Classic UI. That is, it reopens the same case within the Lightning Console, but rendered in Classic UI. – Brad Edgerly Sep 21 '17 at 4:20
1

Set the return flow URL to Case.Id. Not sure if setting the finishLocation="{!Case.Id}" would be the same thing or not. I do not use flows so....

According to the documentation

To redirect users to a specific page in Salesforce after they click Finish:

/flow/flowName?retURL=url

where url is a relative URL (the part of the URL that comes after https://yourInstance.salesforce.com/ or https://yourInstance.lightning.force.com/).

  • For Lightning Experience URLs, Salesforce always redirects your users to the home page in Lightning Experience (one/one.app), even if the user has Salesforce Classic enabled. Users who don’t have permission to access Lightning Experience see an error message.

This flow URL redirects users to Accounts home, which exists in both Lightning Experience and Salesforce Classic.

/flow/myFlow?retUrl=001/o

When Lightning Experience users finish the flow interview, Salesforce redirects them to http://yourInstance.lightning.force.com/one/one.app#/sObject/Account/home. When Salesforce Classic users finish the flow interview, Salesforce redirects them to http://yourInstance.salesforce.com/001/o. Either way, Salesforce redirects users to Accounts home in their respective experience.

Unless this limitation applies to your use case:

You can’t use a flow variable as the value for the retURL parameter. If you want to use a flow variable to redirect a user, such as to a specific record, distribute the flow by using Visualforce.

  • Hi, this still resolves the page record in Classic UI. – Brad Edgerly Sep 21 '17 at 14:27
  • @BradEdgerly - Then you would need to submit a support ticket as the documentation explicitly states it will resolve to a lightning URL. Maybe you have other windows open in classic and the UI is switching back due to cache/cookies – Eric Sep 21 '17 at 14:42
  • @BradEdgerly - Any luck, is this issue resolved? I am trying with a retURL=apex/myPage but doesn't work, it loops through the flow instead. – Khyber Feb 7 at 16:10
  • @Khyber, I did not find a fix or work-around for my use case. – Brad Edgerly Feb 8 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.