PlatformAction
PlatformAction は、参照のみの仮想オブジェクトです。ユーザ、コンテキスト、デバイス形式、レコード ID に応じて、UI に表示するアクションを照会できるようにします。たとえば、標準およびカスタムボタン、クイックアクション、生産性アクションなどを照会できます。
サポートされているコール
describeSObjects()、query()
項目
使用方法
PlatformAction は、describeSObjects() を使用して記述できます。
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’) 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'