I have a visual flow and I added jQuery to handle a click event on the finish button that calls sforce.one.navigateToURL(). The goal is to direct a user to a detail page once the flow is complete. It works well when I hard code a value for the ID, but when I use the PageReference reference variable it's just a blank screen in the Salesforce1 app. I also tried passing the variable to the finishLocation flow attribute, but I get the same results. What am I missing? Is there another possible solution I can explore?
Just looking at some standard documentation, it does not look like a fruitful line of pursuit:
When developing Visualforce pages for the full site developers can utilize the Page Reference class to control the navigation. This method is not supported in Salesforce1 and may not work as expected. Some pages will load using Page References however this may change with any update and should not be relied on. Salesforce Support is unable to troubleshoot issues that arise from using a Page Reference for navigation in Salesforce1.
A good starting point is Managing Navigation in Salesforce1. The best case is if you have a record
Id to work with. With that you can use
sforce.one.navigateToSObject. Failing that, you can provide a fallback url to the
sforce.one.navigateToURL method as mentioned in your OP.
if (recordId) sforce.one.navigateToSObject(recordId); else if (redirectUrl) sforce.one.navigateToUrl(redirectUrl);
Specifically with a
PageReference you can theoretically do: