I have created a new tab for a custom object and now want to override the standard new/edit actions to open a custom lightning web component I have created. I have got the standard detail action to open my custom lightning web component. But I cannot work out how to override the action when clicking the new button or clicking the edit record button. I have found the action override screen in setup under the object manager but my lightning web component does not show as an option?

Any links on how to do this? I'm guessing it is something I am missing in the components XML targets file but I've gone through all the documentation and can't see what it could be.


You can not directly override action with Lightning web component directly. You need to call your component in Aura Component and use that aura component to override the action.

Aura interfaces that are not listed don’t currently have an equivalent in Lightning Web Components.

  1. lightning:hasPageReference
  2. flexipage:availableForAllPageTypes
  3. flexipage:availableForRecordHome
  4. force:hasRecordId
  5. force:hasSObjectName
  6. forceCommunity:availableForAllPageTypes
  7. clients:availableForMailAppPage
  8. clients:availableForMailAppPage

Read here:- Migrate Interfaces

You can read here how to use Lightning Web Component in aura component :- Compose Aura Components from Lightning Web Components

| improve this answer | |
  1. When you want to use in record home pages, app pages etc, you need to use in Lightning App Builder. You can configure meta file

  2. Action overrides are not yet available. You can refer to this document reguarly to check what all features are available at any point of time.

Supported Salesforce Experiences and Tools

Lightning web components are supported in many Salesforce experiences and tools. To use a Lightning web component with an unsupported experience or tool, wrap it in an Aura component.

These Salesforce experiences and tools are supported.

Lightning Experience
Salesforce App
Lightning Communities
Lightning App Builder
Community Builder
Standalone Apps
Lightning Components for Visualforce
Lightning Out (beta)
First-Generation Managed Packages
Second-Generation Managed Packages
Unlocked Packages
Unmanaged Packages
Change Sets
Metadata API—LightningComponentBundle
Tooling API—LightningComponentBundle, LightningComponentResource
Embedded Service Chat
Gmail and Outlook integration

Unsupported Experiences and Tools

Lightning Web Components doesn’t currently support these Salesforce experiences and tools. To use a Lightning web component with these experiences and tools, wrap the component in an Aura component.

Salesforce Console (Navigation Item API, Workspace API, UtilityBar API)
Utility Bars
URL Addressable Tabs
Conversation Toolkit API, Omni Toolkit API, Quick Action API
Standard Action Overrides, Custom Actions, Global Actions, List View
Actions, Related List View Actions
Chatter Extensions

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.