In a dev org, I am trying to create a Global Action to call a Flow via a LWC, but I am receiving the following error messages:
Here is the code for the component:
<aura:component implements="force:lightningQuickActionWithoutHeader,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global">
<!-- Add scroll bar to docked composer -->
<div class="slds-docked-composer">
<lightning:flow aura:id="flowData" />
</div>
<!-- Component is initialized -->
<aura:handler name="init" value="{!this}" action="{!c.init}" />
</aura:component>
Here's the style code:
.THIS .slds-docked-composer {
overflow-y: scroll !important;
}
And here's the controller code:
({
init : function(component) {
// Find the component whose aura:id is "flowData"
let flow = component.find("flowData");
// In that component, start your flow. Reference the flow's Unique Name/API Name.THIS
flow.startFlow("New_Case");
}
})
I am able to create the Action in a sandbox. The only difference is that in the sandbox, I wrote the code in the Dev Console in Salesforce, whereas for this dev org (my personal org used in job interviews, etc.) I used VSCode and deployed to the org from there.
In addtion, I am able to create the Action in the dev org when I leave Standard Label Type as None. However, when I edit the Action to add the Label Type, I still receive the "Error: Field cannot be set for type Lightning Component" message.
Does anyone have any idea what the problem could be?