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:
3 {actionName: "Case._LightningUpdateCase", recordId: "recordId", type: "QuickAction"}
4 {actionName: "FeedItem.TextPost", recordId: "recordId", type: "QuickAction"}
5 {actionName: "Case.LogACall", recordId: "recordId", type: "QuickAction"}
6 {actionName: "Case.SendEmail", recordId: "recordId", type: "QuickAction"}
7errors: []