admin管理员组文章数量:1122846
I am trying use a Quick Action that launches a Flow and I'm getting the error
The action you specified isn’t available on the current record page.
Here is the Component Code:
<aura:component
implements="flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickActionWithoutHeader,lightning:isUrlAddressable,force:appHostable,flexipage:availableForAllPageTypes"
<lightning:workspaceAPI aura:id="workspace" />
<lightning:quickActionAPI aura:id="quickActionAPI" />
<lightning:navigation aura:id="navService" />
<aura:handler name="refreshPage" event="force:refreshView" action="{!c.forceRefresh}" />
<aura:attribute name="recordId" type="Id" />
<aura:attribute name="case" type="Object" />
<aura:attribute name="caseRecord" type="Case" default="{'sObjectType': 'Case'}" />
<force:recordData aura:Id="recordData" recordId="{!v.recordId}" mode="EDIT" targetRecord="{!v.case}"
targetFields="{!v.caseRecord}" recordUpdated="{!c.recordUpdated}"
fields="ID, OwnerId"/>
<div>
<lightning:button variant="brand" class="paylocity-orange" label="Tax Direct Request"
onclick="{!c.TaxDirectRequestClick}"/>
</div>
Here is the Controller code:
TaxDirectRequestClick : function(component, event, helper) {
debugger;
var actionAPI = component.find("quickActionAPI");
var recId = component.get("v.recordId");
var fields = { recordId : recId};
var args = {actionName: "Case.Escalation_Request",
entityName : "Case",
targetFields : fields };
actionAPI.selectAction(args).then(function(result){
actionAPI.invokeAction(args);
}).catch(function(e){
if(e.errors){
//If the specified action isn't found on the page, show an error message in the my component
console.log(e.errors);
}
});
The Escalation_Request quick Action Launches a Flow that accepts the Case ID in a variable named recordId
本文标签: quickactionSalesforce error trying to Launch a Quick Action from Aura ComponentStack Overflow
版权声明:本文标题:quickaction - Salesforce error trying to Launch a Quick Action from Aura Component - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736301701a1931265.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论