For the complete documentation index, see llms.txt. This page is also available as Markdown.

AX - Data Table

Overview

AX - Data Table is a powerful component for the Salesforce Lightning App Builder that displays your Salesforce records in a clean, interactive table.

This component gives you complete control over how your data appears—customize columns, add filters, enable sorting, and let users interact with records directly from the table.

Getting Started

Use this simple tutorial to learn the basics of the Data Table component and start building your use cases.

spinner

Key features

  • Data Integration: Pulls records from any Salesforce object (standard or custom).

  • Customization: Define columns, enable inline edits, and control search/filter fields.

  • Interactivity: Sort, paginate, filter, and export data with minimal clicks.

  • Record Actions: Create, edit, delete, and duplicate records—individually or in bulk—directly from the table.

  • Metrics: Show aggregated metrics (e.g., sum, count) in the header that recalculate as filters change.

  • Header Styling: Add titles, captions, and icons for context.

  • Flexible Display: Show as a card, hide headers, or expand to full screen for a focused view.

  • Dynamic Bindings: Use {{Record.FieldApiName}} to pull current record data on Lightning Record Pages.

Component Comparison

Use Cases

  • Account Record Page: Display related Opportunities, Cases, or Contacts with filtering and export options.

  • Campaign Page: List campaign members, filter by status or engagement, and export for follow-up.

  • Project Page: Display tasks or deliverables with inline edits, enabling efficient management.

  • Sales Dashboard: Present open Opportunities, sorted by stage or close date, with CSV export.

  • Service Overview: Highlight high-priority or overdue Cases with filters by owner or status.

  • Custom Reports Hub: Enable exploration of dynamic record sets (e.g., top accounts) without running reports.


Configuration

Add the Data Table to your page in App Builder and configure its properties in the Properties Panel.

Properties

Label
Type
Default
Required
Description

Object Api Name

String

Yes

Defines the Salesforce object used as the data source for the table. Records displayed in the table are pulled from this object. Example: Opportunity, Case, or a custom object like Custom_Object__c.

Filter

String

SOQL WHERE clause used to filter retrieved records. Example: Status = 'Open' or Priority__c = 'High'. Allows precise control over displayed data.

Order By

String

Field API name used to sort returned records. Common examples: CloseDate, Priority__c. Sorting affects the default order in which rows appear.

Maximum Number of Records

Integer

The maximum number of records to fetch and display on the datatable.

Column Field Names

String

Yes

Comma-separated list of field API names to show as columns in the table. The order determines column positioning.

Searchable Fields

String

Comma-separated list of field API names used in keyword search. If allColumnsSearchable is false, only fields listed here are searchable.

All Columns Searchable

Boolean

false

If true, applies search functionality to all visible columns, even if searchableFields is not specified.

Sortable Fields

String

Comma-separated list of field API names that allow sorting via column headers. Use this to limit sortable fields when not using allColumnsSortable.

All Columns Sortable

Boolean

false

If true, enables sorting on all columns, regardless of what's defined in sortableFields.

Filterable Fields

String

Comma-separated list of field API names used to build the filter panel UI. Allows user-driven filtering based on field values.

All Columns Filterable

Boolean

false

If true, makes every visible column filterable regardless of filterableFields.

Editable Fields

String

Comma-separated list of field API names that support inline editing directly in the table. Enables fast updates without navigating away.

All Columns Editable

Boolean

false

If true, enables inline editing for all visible columns in the table. Overrides editableFields.

Metric Aggregation Fields

String

Show Pagination

Boolean

true

If true, pagination controls appear at the bottom of the table, allowing users to navigate through multiple pages of results.

Number of Records per Page

Integer

25

When pagination is enabled, defines how many records appear per page. When pagination is disabled, it defines the number of records shown based on fixed height.

Header - Title

String

Text shown as the main heading above the data table. Ideal for contextual labeling, such as “Top Opportunities” or “Recent Cases.”

Header - Caption

String

Subheading text shown below the main title. Used to provide additional context such as “Sorted by Close Date” or “Filtered by Priority.”

Header - Icon Name

String

The Lightning Design System name of the icon (e.g.,…

Header - Show Number of Records

Boolean

If true, displays the total number of items in the datatable at the top of the component.

Action - Global Inline Edit

Boolean

If true, displays a global inline edit button that enables users to edit multiple rows directly within the table without navigating to individual records.

Action - Show More Details Panel

Boolean

false

If true, enables a side panel that displays additional record details when a row is selected, providing deeper context without leaving the page.

Action - Full Screen

Boolean

false

If true, displays a button that allows users to expand the data table to full screen, improving visibility for large datasets or detailed analysis.

Action - Enable Record Create

Boolean

false

If true, displays a button that allows users to create a new record in the table.

Action - Enable Record Edit

Boolean

false

If true, add a row action that allows users to edit a record in the table.

Action - Enable Mass Edit

Boolean

false

If true, displays a button that allows users to edit multiple records in the table.

Action - Enable Record Delete

Boolean

false

If true, add a row action that allows users to delete a record in the table.

Action - Enable Mass Delete

Boolean

false

If true, displays a button that allows users to delete multiple records in the table.

Action - Enable Record Duplicate

Boolean

false

If true, add a row action that allows users to duplicate a record in the table.

Action - Enable Mass Duplicate

Boolean

false

If true, displays a button that allows users to duplicate multiple records in the table.

Action - Enable Export

Boolean

false

If true, displays a button that allows users to export the table data to a Excel/CSV file.

Hide Table Header

Boolean

false

If true, hides the header row of the table (column names). Useful for minimalist or embedded layouts.

Hide Table Borders

Boolean

false

If true, hides the borders of the table. Only works if hideTableHeader is also true.

Hide Table Header Default Actions

Boolean

true

If true, removes default table header actions. Allows for a cleaner table interface.

Use Case Examples

spinner

This example shows related Opportunities with filters and inline edits.

Example 2: Campaign Member Checklist

spinner

This example lists Campaign Members with filters and CSV export.

Result: A card-wrapped table for Campaign Members, searchable and filterable.

Example 3: Opportunity Summary with Aggregated Metrics

This example displays all Opportunities for an Account with total value and record count metrics in the header.

1

Configure Data Source

Defines which records to display and how they're organized.

  • Object Api Name: Opportunity

  • Filter: AccountId = '{{Record.Id}}'

  • Column Field Names: Name,Amount,Stage,CloseDate

  • Order By: Amount DESC

2

Set Header and Metrics

Controls the visual header and summary calculations shown above the table.

  • Header - Title: All Opportunities

  • Header - Caption: Related to {{Record.Name}}

  • Header - Icon Name: standard:opportunity

  • Metric Aggregation Fields: SUM(Amount), COUNT(Id)

3

Enable Display Options

Configures pagination and user interaction capabilities.

  • Show Pagination: On

  • Number of Records per Page: 25

  • All Columns Sortable: On

  • All Columns Filterable: On

Result: A comprehensive table showing all related Opportunities with live-updating metrics in the header. Users can see the total pipeline value and record count at a glance, and sort by any column and filter results. The metrics automatically recalculate when filters are applied, so filtering by Stage instantly shows the sum and count for just those filtered records.


Key Considerations

  • Dynamic Bindings: Use {{Record.FieldApiName}} on Record Pages for context-aware headers/filters.

  • Performance: Limit records (limit) for large datasets; combine with pagination.

  • Inline Editing: Ensure editableFields match user permissions to avoid errors.

  • Filtering/Search: Select specific fields for precision; allColumnsSearchable simplifies setup but may slow performance.

  • Accessibility: Use clear header titles/captions; ensure sortable/editable columns are keyboard-navigable.


Troubleshooting Common Issues

  • No Records Shown: Verify sObjectApiName and filter syntax; check object permissions.

  • Bindings Fail: Ensure {{Record.FieldApiName}} matches current page context; test in preview.

  • Search/Filters Missing: Enable searchableFields/filterableFields or toggle allColumns options.

  • Edits Not Saving: Confirm editableFields permissions and field-level security; check for validation rule errors on the object.

  • Layout Issues: Adjust Style Panel for margins/padding; test card display on mobile.


Need More Advanced Features?

Last updated

Was this helpful?