Custom Actions
Tables have the ability to configure custom actions and use them with different views. First, we have to define the feature and then relate it to view(s) in which we want to use custom actions using the view feature. Depend on the custom action type we have to configure JSON. For now, the tables support the below type of custom actions:
Here are detailed steps:
Create “Feature” Record
Create “View Feature” Record
View = Select View
Object Feature = Select Action
View Name / Object Feature Name = View Developer Name
Object = Object API Name
Configuration = Config JSON (Refer below sections to configure different types of custom actions)
Supported Configuration JSON Attributes
icon
- Any utility icon from https://www.lightningdesignsystem.com/icons/recordLevel
- Available options:<blank>
,single
,multiple
,single+multiple
refreshOnClose
- Whether to refresh Tables on action closeshowInToolBar
- Whether to display in toolbar actions or not (by default available in context menu)targetConfiguration
- JSON object configuration for target component or flowtargetType
- Available options:Aura/LWC Component
,Flow
Supported Target Configuration Attributes
title
- Title of modalcomponentName
- Fully qualified API name of component or flowcomponentParams
- Parameters to be passed on to target componentcomponentParamsList
- Parameters to be passed on to target of type list (i.e. for Flow type)bodyCss
- Custom CSSheight
- Height of modalwidth
- Width of modalfooterActions
- Available actions on footer
Supported Target Configuration > Footer Actions Attributes
name
- Unique name of the footer action (used for events)label
- Label shown to userstheme
- Displayed button variant of the footer action. Available options:base
,neutral
,brand
,brand-outline
,destructive
,destructive-text
,inverse
,success
Supported Dynamic Target Configuration > Component/Flow Params Attributes
** Most of these (newer) attributes require minimum Tables Package version 1.130
.
selectedRecordId
- First selected record’s IDselectedRecord
- First selected recordselectedRecordIds
- Selected record ID's listselectedRecords
- Selected records listobjectApiName
- Object Api Name of current Tables ViewviewDeveloperName
- Developer Name of current Tables ViewtablesView
- Current Tables View recordrelatedFieldApiName
- Related Field Api Name for loading only related recordsrelatedRecordId
- Related Record ID for loading only related recordsuserId
- Currently logged in Salesforce user IDlocale
- Currently logged in Salesforce user’s locale codelanguage
- Currently logged in Salesforce user's language codetimeZone
- Currently logged in Salesforce user's time-zone codeuserCurrencyCode
- Currently logged in Salesforce user’s currency codeorgCurrencyCode
- Default currency code for orgisUserTablesAdmin
- If currently logged in Salesforce user has Tables Admin permission set assignedisMultiCurrencyEnabled
- If multi-currency is enabled for org