Navigating between pages
Navigation in Salesforce1 is based on JavaScript events rather than URLs, which means a different approach needs to be taken to simply rendering HTML links. The navigation functionality is made available to Visualforce pages in Salesforce1 via the sforce.one
JavaScript object.
This object provides a number of navigation functions, but the key ones are:
navigateToURL
: This navigates to the specified URL, which may be internal or externalnavigateToSObject
: This navigates to the home page for a specificsObject
record
Note
Full details of the sforce.one object can be found at: https://developer.salesforce.com/docs/atlas.en-us.salesforce1.meta/salesforce1/salesforce1_dev_jsapi_sforce_one.htm?search_text=navigate.
The sforce.one ...
Get Visualforce Development Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.