Podcast
Questions and Answers
Which of the following mechanisms for controlling navigation from one page to another are considered 'classic' Visualforce mechanisms?
Which of the following mechanisms for controlling navigation from one page to another are considered 'classic' Visualforce mechanisms?
Which of the following techniques does NOT work in Lightning Experience?
Which of the following techniques does NOT work in Lightning Experience?
What is a primary purpose of navigation in application design?
What is a primary purpose of navigation in application design?
Which of these is NOT considered a navigation element in a user interface?
Which of these is NOT considered a navigation element in a user interface?
Signup and view all the answers
In the context of Lightning Experience, which of the following events can be used for navigation?
In the context of Lightning Experience, which of the following events can be used for navigation?
Signup and view all the answers
Which feature allows Visualforce pages to utilize new navigation mechanisms in Lightning Experience?
Which feature allows Visualforce pages to utilize new navigation mechanisms in Lightning Experience?
Signup and view all the answers
What is a significant aspect of navigation design that differs between Salesforce Classic and Lightning Experience?
What is a significant aspect of navigation design that differs between Salesforce Classic and Lightning Experience?
Signup and view all the answers
Which of the following is an example of a navigation menu action in a user interface?
Which of the following is an example of a navigation menu action in a user interface?
Signup and view all the answers
What should be avoided when building Visualforce navigation in JavaScript?
What should be avoided when building Visualforce navigation in JavaScript?
Signup and view all the answers
Which method is used to open the page for creating a new record for a specific entity?
Which method is used to open the page for creating a new record for a specific entity?
Signup and view all the answers
Why is the sforce.one utility object not available in Salesforce Classic?
Why is the sforce.one utility object not available in Salesforce Classic?
Signup and view all the answers
What is the correct function to navigate to a specific record by its ID?
What is the correct function to navigate to a specific record by its ID?
Signup and view all the answers
Which of the following approaches is NOT recommended when linking to edit a Contact record?
Which of the following approaches is NOT recommended when linking to edit a Contact record?
Signup and view all the answers
What is a significant feature of the navigation stack in Lightning Experience?
What is a significant feature of the navigation stack in Lightning Experience?
Signup and view all the answers
Which utility method is recommended to simplify navigation logic across Salesforce Classic and Lightning?
Which utility method is recommended to simplify navigation logic across Salesforce Classic and Lightning?
Signup and view all the answers
What happens if navigation functions in sforce.one are bypassed?
What happens if navigation functions in sforce.one are bypassed?
Signup and view all the answers
What is the purpose of the editRecord function?
What is the purpose of the editRecord function?
Signup and view all the answers
What does Lightning Experience utilize instead of direct window.location access?
What does Lightning Experience utilize instead of direct window.location access?
Signup and view all the answers
What does a Classic Visualforce navigation action method return to indicate where the user should be navigated?
What does a Classic Visualforce navigation action method return to indicate where the user should be navigated?
Signup and view all the answers
Which of the following best describes the modern approach to navigation in Visualforce apps?
Which of the following best describes the modern approach to navigation in Visualforce apps?
Signup and view all the answers
What is a key advantage of using the sforce.one object in Lightning Experience?
What is a key advantage of using the sforce.one object in Lightning Experience?
Signup and view all the answers
Why should developers test for the existence of the sforce.one object in their code?
Why should developers test for the existence of the sforce.one object in their code?
Signup and view all the answers
What happens when a user clicks 'save' after opening a form through custom action in a Visualforce app?
What happens when a user clicks 'save' after opening a form through custom action in a Visualforce app?
Signup and view all the answers
Which function in the sforce.one object allows navigation to a specific sObject record?
Which function in the sforce.one object allows navigation to a specific sObject record?
Signup and view all the answers
What is the role of JavaScript in modern Visualforce navigation?
What is the role of JavaScript in modern Visualforce navigation?
Signup and view all the answers
Which function navigates to a user's previous state saved in the sforce.one history?
Which function navigates to a user's previous state saved in the sforce.one history?
Signup and view all the answers
Which of the following statements about Classic and Modern Visualforce navigation is true?
Which of the following statements about Classic and Modern Visualforce navigation is true?
Signup and view all the answers
What does the navigateToFeed function do in the sforce.one object?
What does the navigateToFeed function do in the sforce.one object?
Signup and view all the answers
Study Notes
Learning Objectives
- Understand three classic Visualforce mechanisms for page navigation.
- Identify Visualforce techniques incompatible with Lightning Experience.
- Recognize at least three navigation events in Lightning Experience and their implementation.
Managing Navigation
- App flow and navigation are crucial components of application design.
- Visualforce offers various ways to manage navigation and user flow.
- Lightning Experience introduces new navigation mechanisms while supporting classic Visualforce methods.
Navigation Overview
- Navigation refers to user interface elements that direct actions, such as menus and buttons.
- Behavior behind navigation actions is driven by Salesforce's internal code.
- Custom applications control user flow through code.
Classic Visualforce Navigation
- Classic navigation centers on action methods returning a
PageReference
object to dictate next user actions. - Standard Controllers inherently return a
PageReference
from their action methods.
Modern Visualforce Navigation
- Increasing use of JavaScript in Visualforce applications is shifting navigation management from server-side to client-side.
- Lightning Experience employs a navigation event framework through the
sforce.one
JavaScript object.
sforce.one Navigation Functions
-
sforce.one
is unavailable in Salesforce Classic; always check its existence in code. - Functions include:
-
back([refresh])
: navigates to the previous state in the history. -
navigateToSObject(recordId [, view])
: goes to a specific sObject record. -
navigateToURL(url [, isredirect])
: accesses a specified URL. -
createRecord(entityName [, recordTypeId])
: opens page to create a new record. -
editRecord(recordId)
: opens page to edit a specific record.
-
Navigation Best Practices
- Avoid using
window.location
directly in JavaScript-based Visualforce navigation to prevent disruption in Lightning Experience. - Navigation events should be tracked through the
sforce.one
utility to ensure proper functionality of the back button and navigation stack features.
Salesforce Classic Limitations
- The
sforce.one
object is not available in Salesforce Classic; developers must utilizewindow.location
. - Recommendations include wrapping navigation functions in utility methods for cleaner navigation logic.
Static URLs Avoidance
- Do not hardcode static URLs for navigation to Salesforce resources; they may not work in all contexts.
- Opt for dynamic methods:
- Use
{!URLFOR($Action.Contact.Edit, recordId)}
in Visualforce. - Utilize
navigateToSObject(recordId)
in JavaScript for navigation actions.
- Use
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
This quiz focuses on essential navigation mechanisms within Visualforce and Lightning Experience. You'll explore classic page navigation techniques, identify incompatible methods, and recognize key navigation events in Lightning. Test your understanding of how to effectively manage app flow.