9

I have a requirement where I want to create an action using LWC component. But I am facing the below issue while creating the quick action

enter image description here

As per the Salesforce release documentation, I have copied the targets but still, it is not working.

LWC component metadata file is as follows:

  1. With the actionType as Action enter image description here

  2. I also tried with the actionType as ScreenAction, still it is not working.

Does anyone have any idea about this? How to add LWC as a quick action?

As per the this Salesforce documentation, We need to use lightning-quick-action-panel with the lightning__RecordAction target to use your custom component as a quick action on a record page. But there is no information available about the lightning-quick-action-panel in the Component reference documenation.

Note - I don't want to wrap the LWC component inside Aura component and use it as a Quick action.

Thanks in advance.

0

2 Answers 2

11

As the error states:

Lightning Web Components quick actions are not supported for this entity (emphasis mine)

That means that you can use LWCs as Quick Actions, but not on Work Orders. The documentation also says:

NOTE LWC quick actions are currently supported only on record pages.

LWCs only recently gained any Quick Action support, and it will likely take some time before all/most objects are supported. For now, you do need to use the Aura Component wrapper workaround until support is added.

3
  • 1
    I also posted the same question on the trailblazer community and got the below response: they are supported for the Custom Objects, Accounts, Contacts, Leads, Opportunities, Cases for Record Page. I also tried to create a quick action with LWC component on Account object and it worked. Commented May 8, 2021 at 6:01
  • Apart from @sfdcfox's helpful suggestion, Salesforce Document is not yet up-to date today. The Lightning Web Components Developer Guide: Lightning Quick Actions throws an error right now because v52 documentation is not out yet. We have to wait a couple of days for more clarity.
    – tumbledore
    Commented May 10, 2021 at 7:44
  • @HemantKeni thank you very much for the information in the comment! I was trying to do this for the Service Appointment object (so it is on a record page, all should be good according to the documentation), and got the same error. Tried to do it on the Account, and it went through. Looks like wrapping it is...
    – Bloke
    Commented Jun 14, 2021 at 20:00
1

Quick Action with Lwc is not supported for all standard objects. few objects are like Asset, Quote, Contract etc. You can use Aura component and put your lwc component inside it as a temporary solution.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .