You need to sign in to do that
Don't have an account?
Terence Viban
Headless Quick Action For a LWC - You can only create Quick Actions with actionSubtype matched with the Lightning Web Component you defined
Hi there,
I have created an LWC and wanted to create a headless Quick Action that uses it. I get the following error - "You can only create Quick Actions with actionSubtype matched with the Lightning Web Component you defined"
This action was previously created and worked flawlessly. Then a colleague deleted it and now I cannot recreate it again. Nothing has changed in the definition of the LWC or in the LWC itself.
This is what the definition looks like;
And also the invoke method is in place
As I mentioned above, this worked previously before it was deleted. Also it is being used flawlessly on other objects as a quick action. Anyone has any ideas? thanks in advance
I have created an LWC and wanted to create a headless Quick Action that uses it. I get the following error - "You can only create Quick Actions with actionSubtype matched with the Lightning Web Component you defined"
This action was previously created and worked flawlessly. Then a colleague deleted it and now I cannot recreate it again. Nothing has changed in the definition of the LWC or in the LWC itself.
This is what the definition looks like;
<?xml version="1.0" encoding="UTF-8"?> <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> <apiVersion>52.0</apiVersion> <isExposed>true</isExposed> <targets> <target>lightning__RecordAction</target> <target>lightning__RecordPage</target> </targets> <targetConfigs> <targetConfig targets="lightning__RecordAction"> <actionType>Action</actionType> </targetConfig> <targetConfig targets="lightning__RecordPage"> <supportedFormFactors> <supportedFormFactor type="Small" /> <supportedFormFactor type="Large" /> </supportedFormFactors> </targetConfig> </targetConfigs> </LightningComponentBundle>
And also the invoke method is in place
@api invoke () { this.isAction = true; this.showButton = false; if(this.recordId && this.objectApiName) this.performHlsCheck(); }
As I mentioned above, this worked previously before it was deleted. Also it is being used flawlessly on other objects as a quick action. Anyone has any ideas? thanks in advance
I hope lightning__RecordPage is not supported for Action type so it is causing the issue. After commenting those lines it is working as expected.
If this solution helps, Please mark it as best answer.
Thanks,