• Miriam Gutiérrez
  • 0 Points
  • Member since 2017

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
Hey everyone,

we have a flow which we invoke by a Visualforce page to redirect it to an opportunity record after the flow finishs:
<apex:page standardController="Opportunity">   
    <flow:interview name="Opportunity__Flow" finishLocation="/{!Opportunity.Id}">
        <apex:param name="recordId" value="{!Opportunity.Id}"/>

Now, this does not work in the Salesforce mobile app. Salesforce hinted me to:

Now my Visualforce page looks like:
<apex:page standardController="Opportunity">   

    <flow:interview name="Opportunity_Flow" finishLocation="sforce.one.navigateToSObject(\'' + {!Opportunity.Id} + '\')';">
        <apex:param name="recordId" value="{!Opportunity.Id}"/>
    <script type="text/javascript">
        function getRecordURL() {
            var recordURL = 'sforce.one.navigateToSObject(\'' + '{!Opportunity.Id}' + '\')';
            return recordURL;

I tried it both as a function and dirctly in the finishLocation-parameter. Both lead to the error:
Invalid Page Redirection
The page you attempted to access has been blocked due to a redirection to an outside website or an improperly coded link or button. Please contact your salesforce.com Administrator for assistance. For more information, see Insufficient Privileges Errors. 

Click here to return to the previous page.

Does anyone have experience with flow redirections in the Salesforce mobile app? 

Kind regards,

Hello All,
     I'm stuck in the middle of this problem I don't know how check from which source user page extrated. If I open user page first in salesforce classic and after I switch it to Lightning.
Thanks to all of you in advance

Taresh Pandey