You need to sign in to do that
Don't have an account?
Gleb Gawriljuk
Redirecting Visual Flows in Lighting Browser and Salesforce App
Hey everyone,
we have a flow which we invoke by a Visualforce page to redirect it to an opportunity record after the flow finishs:
Now, this does not work in the Salesforce mobile app. Salesforce hinted me to:
https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/vf_dev_best_practices_navigation.htm
Now my Visualforce page looks like:
I tried it both as a function and dirctly in the finishLocation-parameter. Both lead to the error:
Does anyone have experience with flow redirections in the Salesforce mobile app?
Kind regards,
Gleb
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}"/> </flow:interview> </apex:page>
Now, this does not work in the Salesforce mobile app. Salesforce hinted me to:
https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/vf_dev_best_practices_navigation.htm
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}"/> </flow:interview> <script type="text/javascript"> function getRecordURL() { var recordURL = 'sforce.one.navigateToSObject(\'' + '{!Opportunity.Id}' + '\')'; return recordURL; } </script> </apex:page>
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,
Gleb
Did you find a solution? I'm experiencing the same issue "Invalid page redirection".
I want to return to the record page from where the flow was called (in the same window/tab, we don't want a new window to be opened).
My VF page looks like this:
As I'm already using a standard controller, I can't use a controller to redirect to the record page. So, I'm using an extension which calls to my javascript code. If we are in SF1 then, sforce.one should fire. If we are in classic then, window.location should fire.
The extension code is:
Thanks for your help!
Miriam