Visualforce & Lightning Experience  - Manage Navigation
28 Questions
0 Views

Visualforce & Lightning Experience - Manage Navigation

Created by
@Carenem

Questions and Answers

Which of the following mechanisms for controlling navigation from one page to another are considered 'classic' Visualforce mechanisms?

  • Visualforce Components (correct)
  • Page Redirects (correct)
  • Lightning Component Navigation
  • Custom URL Buttons (correct)
  • Which of the following techniques does NOT work in Lightning Experience?

  • Custom URLs
  • Visualforce Page Redirects
  • Action Functions (correct)
  • Visualforce Components
  • What is a primary purpose of navigation in application design?

  • To enhance visual aesthetics
  • To add custom features
  • To guide users through application flow (correct)
  • To manage user data storage
  • Which of these is NOT considered a navigation element in a user interface?

    <p>Data entry forms</p> Signup and view all the answers

    In the context of Lightning Experience, which of the following events can be used for navigation?

    <p>Tab Change Event</p> Signup and view all the answers

    Which feature allows Visualforce pages to utilize new navigation mechanisms in Lightning Experience?

    <p>Adoption of Lightning Components</p> Signup and view all the answers

    What is a significant aspect of navigation design that differs between Salesforce Classic and Lightning Experience?

    <p>The user interface layout and design</p> Signup and view all the answers

    Which of the following is an example of a navigation menu action in a user interface?

    <p>Launching a custom process</p> Signup and view all the answers

    What should be avoided when building Visualforce navigation in JavaScript?

    <p>Setting window.location directly</p> Signup and view all the answers

    Which method is used to open the page for creating a new record for a specific entity?

    <p>createRecord</p> Signup and view all the answers

    Why is the sforce.one utility object not available in Salesforce Classic?

    <p>It is only for Lightning Experience.</p> Signup and view all the answers

    What is the correct function to navigate to a specific record by its ID?

    <p>navigateToSObject</p> Signup and view all the answers

    Which of the following approaches is NOT recommended when linking to edit a Contact record?

    <p>Building a static URL string</p> Signup and view all the answers

    What is a significant feature of the navigation stack in Lightning Experience?

    <p>It tracks navigation events for easy backtracking.</p> Signup and view all the answers

    Which utility method is recommended to simplify navigation logic across Salesforce Classic and Lightning?

    <p>Utility methods that wrap navigation functions</p> Signup and view all the answers

    What happens if navigation functions in sforce.one are bypassed?

    <p>Navigation events will not be tracked in the Lightning Experience navigation stack.</p> Signup and view all the answers

    What is the purpose of the editRecord function?

    <p>To edit a record specified by its ID</p> Signup and view all the answers

    What does Lightning Experience utilize instead of direct window.location access?

    <p>Single-page application architecture</p> Signup and view all the answers

    What does a Classic Visualforce navigation action method return to indicate where the user should be navigated?

    <p>A PageReference object</p> Signup and view all the answers

    Which of the following best describes the modern approach to navigation in Visualforce apps?

    <p>It incorporates JavaScript events for navigation.</p> Signup and view all the answers

    What is a key advantage of using the sforce.one object in Lightning Experience?

    <p>It simplifies programmatic navigation.</p> Signup and view all the answers

    Why should developers test for the existence of the sforce.one object in their code?

    <p>It is not available in Salesforce Classic.</p> Signup and view all the answers

    What happens when a user clicks 'save' after opening a form through custom action in a Visualforce app?

    <p>The action method will be executed to determine the next navigation.</p> Signup and view all the answers

    Which function in the sforce.one object allows navigation to a specific sObject record?

    <p>navigateToSObject</p> Signup and view all the answers

    What is the role of JavaScript in modern Visualforce navigation?

    <p>It enables client-side event handling for navigation.</p> Signup and view all the answers

    Which function navigates to a user's previous state saved in the sforce.one history?

    <p>back</p> Signup and view all the answers

    Which of the following statements about Classic and Modern Visualforce navigation is true?

    <p>Classic navigation will continue to function as intended.</p> Signup and view all the answers

    What does the navigateToFeed function do in the sforce.one object?

    <p>It directs the user to a feed of a specified type for a subject.</p> 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 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.
    • 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 utilize window.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.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    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.

    Use Quizgecko on...
    Browser
    Browser