PDI practice question 1 of 30

What can be used to override the Account's standard Edit button for Lightning Experience?

Full set: 201 questions
Answer options
A: Lightning action
B: Lightning page
C: Lightning component Correct answer
D: Lightning flow
Correct Answer:
C. Lightning component
Explanation

To override a standard button or action, such as 'Edit' on the Account object in Lightning Experience, a developer must use a Lightning component. In the object's "Buttons, Links, and Actions" settings, the standard 'Edit' action can be configured to launch a custom Lightning component instead of the default behavior. The component must be specifically designed for this purpose by implementing the lightning:actionOverride interface (for Aura components) or by being configured with the lightningRecordActionOverride target in its metadata (for Lightning Web Components). This is the direct and standard declarative method for replacing the functionality of a standard action with custom UI and logic.

Why Incorrect

A. Lightning action: A custom action can be created, but "Lightning action" itself is not a type of resource you select to override a standard button. The override is configured to use a Lightning component or Visualforce page.
B. Lightning page: A Lightning page (e.g., a record page) is a container for components and controls the overall layout. It is not used to override the specific behavior of a standard button like 'Edit'.
D. Lightning flow: A Flow cannot be selected directly from the override settings for a standard button. To use a Flow, one must first create a custom action that launches the Flow and then replace the standard button with this new action on the page layout, which is an indirect method. ---

References

1. Salesforce Lightning Component Library - lightning:actionOverride Interface:

Reference: "Implement the lightning:actionOverride interface to enable a component to be used to override a standard action on a Salesforce object. You can override the View, New, Edit, and Tab standard actions." This document directly states that a component implementing this interface is the tool for an override.

2. Salesforce Lightning Web Components Developer Guide - Configure a Component for Action Overrides:

Reference: Section: "Action Overrides". "To use a Lightning web component as an action override, add the lightningRecordActionOverride target to the component’s in its js-meta.xml file." This provides the specific implementation detail for using an LWC to perform the override.

3. Salesforce Help - Override Standard Buttons and Tab Home Pages:

Reference: "In Lightning Experience, you can override the View, New, Edit, and Tab standard actions on most standard and all custom objects. You can override these actions with a Lightning component...". This documentation confirms that a Lightning component is a primary option for overriding standard actions.

4. Salesforce Help - Flow Actions:

Reference: "Create an object-specific action that launches a flow. ... After you create the action, add it to the object’s page layout...". This source clarifies that using a Flow is achieved by creating a new action and modifying the page layout, which is a different mechanism than a direct override of the standard action's definition.

Scroll to Top