Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Latest commit

 

History

History
executable file
·
88 lines (63 loc) · 4.01 KB

sfpegCardListCmp.md

File metadata and controls

executable file
·
88 lines (63 loc) · 4.01 KB

sfpegCardListCmp Component


Introduction

The sfpegCardListCmp component enables to fetch a list of records (via a SOQL/Apex... query) and display a summary card for each one.

It relies on the sfpegListCmp component to fetch the records and the sfpegCardCmp to display them.

It enables to handle cases where direct display of record details is required for a small set of records related to the current one

  • display being adapted to the each record situation (status, record type, object API name)
  • direct edit being possible on each record

Component Configuration

Global Layout

The sfpegCardListCmp basically consists in :

Cards List

App Builder Configuration

In the App Builder, the configuration of the sfpegCardListCmp component consists in

  • setting the card title and icon (and CSS)
  • setting the CSS and size for each sfpegCardCmp displayed
  • selecting one of the available sfpegCardList__mdt custom metadata record configuring how record list is fetched and how they are displayed
  • selecting one of the available sfpegAction__mdt custom metadata record containing the configuration of the header action button bar (see the sfpegActionBarCmp component for details)
  • setting a possible max. number of actions displayed at global header and card header levels to control the width of the corresponding action bars
  • setting various behaviour options (Read-Only, Button Size, Show #Records?, Show Refresh?...)

Record Card List Configuration

Metadata Configuration

The pegCardList__mdt custom metadata provides the configuration of the sfpegCardListCmp components (targeted records, card configuration to apply).
Record Card List Metadata Configuration

A first set of properties defines how to fetch the targets displayed in the card list

  • Query provides the query to execute (as a valid sfpegList__mdt custom metadata record name, see sfpegListCmp for details)
  • Record ID Field indicates which field of the query result is to be used as record Id (Id by default)

A second set of proerties defines how to display each record card

  • Record Name Field indicates which field of the query result is to be used as record card title (Name by default)
  • Icon Name Field indicates which field of the query result is to be used as record card icon name (for dynamic icons), while Icon Name provides a fixed/default value for it
  • Object Name Field and Object Name similarly setting the Object API Name for each record card
  • Card Config Field and Card Config similarly setting the sfpegCard__mdt name to apply for each record card
  • Card Actions Field and Card Actions similarly setting the sfpegAction__mdt name to apply for the header actions of each record card

Note: Card Context is currently reserved for future use (to set the root record context in each record card for their header actions)


Configuration Examples

TO BE CCONTINUED


Technical Details

This component relies on the sfpegCardCmp to display a card for each fetched record. It as this component relies on the standard record-view-form base component to fetch and display record data, data load may become inefficient when the record list becomes too large.

The sfpegCardList component should therefore be used carefully on small record list sizes to mitigate performance impacts.