PlatformAction
PlatformAction は、参照のみの仮想オブジェクトです。ユーザ、コンテキスト、デバイス形式、レコード ID に応じて、UI に表示するアクションをクエリできるようにします。たとえば、標準およびカスタムボタン、クイックアクション、生産性アクションなどをクエリできます。
サポートされているコール
query()
項目
| 項目 | 詳細 |
|---|---|
| ActionListContext | |
| ActionTarget |
|
| ActionTargetType |
|
| ActionTargetUrl |
|
| Category |
|
| ConfirmationMessage |
|
| DeviceFormat |
|
| ExternalId |
|
| GroupId |
|
| IconContentType |
|
| IconHeight |
|
| IconUrl |
|
| IconWidth |
|
| InvocationStatus |
|
| InvokedByUserId |
|
| IsGroupDefault |
|
| Label |
|
| PrimaryColor |
|
| RelatedSourceEntity |
|
| Section |
|
| SourceEntity |
|
| Subtype | |
| Type |
|
使用方法
PlatformAction は、describeSObject() を使用して記述できます。
PlatformAction を直接クエリすることができます。たとえば、次のクエリは、リストされたオブジェクトの各レコードに関連付けられたアクションのすべての項目を返します。
1SELECT ExternalId, ActionTargetType, ActionTargetUrl, ApiName, Category,
2 ConfirmationMessage, ExternalId, GroupId, UiTheme, IconUrl, IconContentType,
3 IconHeight, IconWidth, PrimaryColor, InvocationStatus, InvokedByUserId,
4 IsGroupDefault, Label, LastModifiedDate, Subtype, SourceEntity, Type
5FROM PlatformAction
6WHERE SourceEntity IN ('001xx000003DGsH', '001xx000003DHBq', ‘Task’, ‘Global’) AND
7 ActionListContext = ‘Record’;次のクエリでは、複数の ActionListContext 値を WHERE 句で使用しており、指定されたオブジェクトに対して Lightning Experience ユーザインターフェース (DeviceFormat = 'Desktop') ですべてのアクションが返されます。
1SELECT ActionListContext, Label, Type, Subtype, Section, SourceEntity,
2 RelatedSourceEntity, ActionTarget, ActionTargetType, ApiName, Category,
3 ConfirmationMessage, DeviceFormat, ExternalId, GroupId, IconContentType,
4 IconHeight, IconUrl, IconWidth, Id, InvocationStatus, InvokedByUserId,
5 IsGroupDefault, LastModifiedDate, PrimaryColor
6FROM PlatformAction
7WHERE ActionListContext IN ('Record','Chatter','RelatedList') AND
8 SourceEntity = '001xx000003DlvX' AND
9 DeviceFormat = 'Desktop'