0

I have a custom detail page vf button on Opportunity, once the user clicks it, it runs few validations and redirects to another vf page. It works in Lightning experience in PROD and Sandbox in browser and I could see the debug statements in the controller.

When I test the button in mobile app from my sandbox it works and I could see the debug logs in sandbox when I navigate through this button from mobile Salesforce app.

However when I test the same button in mobile app from Production, it says "Page does not exist Enter a valid url and try again" and also I cannot see any debug logs generated for it.

I mobile app settings, I have Enabled Lightning logs as well.

Appreciate any insights into this issue.

newPage = new PageReference(result);

System.debug('Inside LEGenIO controller:genIOVals:success:BEFORE REDIRECT:newPage==> '+ newPage);

newPage.setRedirect(true);

return newPage;

For all the vf pages involved in this button, I have checked the box "Available for Lightning Experience, Experience Builder sites, and the mobile app"

1 Answer 1

1

URL based navigation and URL redirects are not designed to work in all scenarios the downloadable Salesforce mobile app. This is due to product limitations with the Salesforce mobile app not having the ability to interpret URL navigation as a full-fledged desktop browser (like Chrome, Safari, Firefox and Internet Explorer). Resolution URL based navigation works only in the desktop browser. These browsers are built to handle URL redirects to and from external resources.

The downloadable (iOS based or Android based) Salesforce mobile app, in contrast, does not have URL based navigation, but event-based navigation, using the sforce.one navigation library. As a result, the Salesforce mobile app is not designed to generate an event tied to a external resource URL, and it cannot interpret URL redirects once outside the context of the Salesforce mobile single page app container.

What this means is that calls to external sites are not guaranteed to redirect back to the same record in the Salesforce mobile app, because once the external resource call has been made, the external endpoint cannot be controlled once outside of the single page app context. The sforce.one navigation library, when used to navigate to an external resource, takes the user out of the context of the Salesforce mobile app, and the navigation history stack is not preserved. Thus, navigating using the back button on a mobile device after these calls are made will not guarantee that a user is taken back to the desired record in the Salesforce mobile app, as they have exited the mobile app context.

Salesforce Support can troubleshoot issues where the mobile supported sforce.one navigation library sends out a request to an external resource. However, because of limitations on event-based navigation in the mobile app container context, there are no guarantees on how the URL is interpreted once the user is taken outside of the mobile app context.

Source here and here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .