Migrate Quick Actions
Migrate an Aura quick action by updating the *.js-meta.xml
file on your Lightning web component. There are two types of Aura quick actions:
- A modal with standard action controls, such as a Cancel button, which implements the
force:lightningQuickAction
interface - A modal without additional controls, which implements the
force:lightningQuickActionWithoutHeader
interface
Here's the Aura syntax for the force:lightningQuickAction
interface.
Here's the Aura syntax for the force:lightningQuickActionWithoutHeader
interface.
LWC quick actions are currently supported only on the record page.
To configure your *.js-meta.xml
file, see these resources:
LWC quick actions can be a screen action or a headless action. A screen quick action appears in a modal window. A headless quick action executes custom code without a modal window.
You can also use a headless quick action to navigate to another page using the lightning/navigation
module.
For more information, see Configure a Component for Quick Actions.
A common use case for using an LWC quick action is to provide custom functionality that's not available with standard quick actions or default actions.
For example, you want to display a modal with information, and then include a button that displays a create record modal. In an Aura quick action, you can call force:recordCreate
when the button is clicked. When you migrate to an LWC quick action, you can use the lightning/navigation
module to achieve the same behavior.
A custom quick action can open an Aura-based modal or an LWC-based modal.
Aura-based modals are opened by triggering an Aura quick action. LWC-based modals are opened by triggering an LWC quick action. However, an Aura quick action can also open an LWC-based modal via the force:recordCreate
event if an LWC-enabled object is passed to the event.
An Aura-based modal cannot be URL addressable, which means the browser doesn't track the modal in its history. An LWC-based modal is URL addressable, and you can use the browser's Back button to go back to the modal.
After you create the record successfully, you are either returned back to the original record page that triggered the quick action or redirected to the newly created record page. This behavior is known as post-save navigation behavior.
Post-save navigation is determined by several factors, whether the modal is Aura- or LWC-based and whether the modal is stacked. Modals that are opened by Aura quick actions are not stacked, which means that a modal is closed when another is opened.
For example, let's say you have an Aura component that implements force:lightningQuickAction
. The component contains a button that calls force:recordCreate
for the case object, which is an LWC-enabled object.
When the event is fired, the Aura-based modal is closed automatically. It then displays the Create Case modal, which is an LWC-based modal that's not stacked. After you save the new case record, you are redirected to the newly created record page.
To achieve the same behavior with an LWC quick action, use the lightning/navigation
module.
For more information, see Quick Action Navigation.
Salesforce enforces the Enabled LWC Stacked Modals release update in Spring '25. This table shows post-save navigation behavior with the release update enabled as compared to its previous behavior.
Enable LWC Stacked Modal Release Update | LWC Stacked Modal Release Update Not Enabled | Example | |
---|---|---|---|
Default Action | Returns back | Returns back | On an account page, click the New Case action. A modal for new case creation is displayed. |
LWC Quick Action (stacked) | Returns back | Returns back | Add an LWC quick action to a contact page. The quick action opens a modal, which contains a button that opens another modal using lightning/navigation . |
LWC Quick Action (not stacked) | Redirects to newly created record page | Redirects to newly created record page | Add an LWC quick action to a contact page. The quick action opens a modal. |
Aura Quick Action (not stacked) | Redirects to newly created record page | Returns back | Add an Aura (Lightning Component) quick action to a contact page. The quick action creates a case using a lightning:recordEditForm base component. |
To customize post-save navigation in an LWC quick action, use the lightning/navigation
module. Consider these differences between Aura and LWC quick actions.
- Aura quick actions—Modals opened by Aura quick actions redirect you to the newly created record page after record save. If you used
force:createRecord
, consider using LWC quick actions instead so you can configure post-save navigation to return you back to the original record page that triggered the quick action. - LWC quick actions—When using the
lightning/navigation
module, the newer modal overlays and stacks on the previous modal by default. To automatically close the previous modal when navigating, set replace totrue
. When replace istrue
, post-save navigation redirects you to the newly created record.
See Also