Skip to content

soqlDatatable: Configuration

James Hou edited this page Jan 31, 2021 · 2 revisions

Allow SOQL Datatable on App / Record Page to launch flow / lwc actions

  1. Create a Custom Metadata (CMDT) row in Datatable_Config__mdt.

    • Type must be text of "Actions" or "Actions;Lookups" (no quotes).
  2. Create a CMDT row in Datatable_Action_Config__mdt.

    • Must Lookup to the Datatable_Config__mdt created in step 1.
    • Follow Page Layout instructions for Type, Order etc.
  3. Input the name of the Datatable_Config__mdt into Action Configuration in App Builder.

    • You can reuse the same Datatable_Config__mdt name in Lookup Configuration if you've configured that Type to "Actions;Lookups".
  4. Place MessageServiceHandler somewhere on the App / Record Flexipage or the Utility bar (without a name/icon). See the main configuration for details.

Configuring a custom Flow Action

  1. Create a CMDT row in Datatable_Action_Config__mdt and follow the steps to reference a Screen Flow.

  2. All Screen Flows must implement the following input variables:

    Name Type Description
    SelectedRows SObject[] Choose the correct Object type in a Record Collection.
    FirstSelectedRow SObject First Selected Row, choose the correct Object in a Record variable.
    UniqueBoundary String For Dialog Auto Close or Event Publisher to refresh the table that opened the Screen Flow.
    SourceRecordId String For Record Pages, the recordId of the record that the soqlDatatable is on.

    For App Pages, this is not required.

Configuring a custom LWC Action

  1. Create a CMDT row in Datatable_Action_Config__mdt and follow the steps to reference a custom LWC.

  2. All custom LWC can optionally implement any of the following @api variables:

    Name Type Description
    selectedRows [] An array of SObjects: [{},{},{}].
    uniqueBoundary String For messageService to know its boundary.

    Can also be a unique string of your choice in case you want to use messageService on a different boundary from within the modal body LWC.
    sourceRecordId String Available on Record Pages, the recordId of the record soqlDatatable is placed on.
Clone this wiki locally