function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AyanHoreAyanHore 

Unable to redirect from visualforce page to salesforce1 object detail

Hi,

I'm developing a mobile optimized VF page (with JQuery Mobile framework) which needs to run in Salesforce1 app. In the Object's details page, there is a link that leads to the mobile optimized page. However, when I'm trying to navigate back to Salesforce1 object detail page, using a link in the VF page, I'm unable to do so. A couple of points I noted:
1. I think navigating to a visualforce page (using a link in Salesforce1 object detail page) removes the sforce.one binding, as a result I'm unable to navigate back (I tried sforce.one.navigateToURL(ObjectId,'detail') method),
2. Not sure if there is currently any way to navigate from a visualforce page to Salesforce1 mobile navigation.

If any of you have faced/resolved this type of issue or know about it, please let me know.

~Ayan
bob_buzzardbob_buzzard
1. You can check if you are out of the Salesforce1 context by checking if the sforce and sforce.one objects are defined.
2. The only way I know of to get back to Salesforce1 having gone to a non SF1 page is to use the URL scheme to go to a specific object - here's the iOS scheme doc: https://success.salesforce.com/06930000003vIt6
Madhanprabhu Thangadurai 1Madhanprabhu Thangadurai 1
try sforce.one.back(true); while navigating from Visualforce Page to your Salesforce1 record detail Page.