この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

getAvailableActions

カスタムコンポーネントを使用して、レコードページで使用可能な項目のリストを取得できます。

引数

なし。

サンプルコード

1getAvailableActions : function( cmp, event, helper) {
2        var actionAPI = cmp.find("quickActionAPI");
3        actionAPI.getAvailableActions().then(function(result){
4            //All available actions shown;
5        }).catch(function(e){
6            if(e.errors){
7                //If the specified action isn't found on the page, show an error message in the my component 
8            }
9        });
10    }

応答

Promise を返します。成功すると、response オブジェクトになります。エラー応答では Promise は却下されます。

1success: true,
2Actions: 0: [{actionName:"Case._LightningUpdateCase", recordId:"500xx0000000006AA", type: “QuickAction”}
3         1: {actionName: “FeedItem.TextPost”, recordid: “500xx0000000006AA”, type: “QuickAction”}]