GM - Record Card

(gmpkg:RecordCardComponent)

Documentation

GM - Record Card component is used to display a card of a related object. The related object could be at any level. The component can be configured to display a list of fields for a simple scenario or layout configuration for complex pages.

Use case: Display the ultimate account details on the contact page.

Specification

PropertyTypeDescription

Card Title *

String

The card title to display

Card Icon

String

The card icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/

Object Name *

String

The name of the related object to display.

Record Id Field *

String

The name of the lookup field to display. If you want to display an account card, set this property to AccountId.

Record Fields

String

Record Fields to display in a JSON format. For instance, for an account card, we can set it to:

["Name", "Website","BillingCity"]

This property is ignored if Record Layout property is defined.

Record Actions

String

Record actions to apply. You can leverage your existing quick actions.

The configuration wizard can be used to build the list of actions. See Actions Configuration

# of columns

Integer

# of columns for the layout. This property is ignored if Record Layout property is defined.

Display Mode

String

Display mode (edit, view, readonly).

Show Border

Boolean

Check this option if you wish to add a border to the card.

Record Layout

String

Record Layout to display. See GM - Record Layout

Show Actions as Buttons

Boolean

Check this option if you wish to display actions as buttons instead of icons.

When the actions are displayed as icons, we can define the icon on JSON actions configuration using the icon attribute.

Visible Actions

Integer

Set the number of visible custom actions. All the core actions will always be displayed depending on the configuration of course.

The remaining custom actions will be added as an option on the button menu.

API Reference

<design:component label="GM - Record Card">
    <design:attribute name="title" label="Card Title" 
                      description="Card Title"/>
    <design:attribute name="icon" label="Card Icon" 
                      description="Card Icon"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show record card border"/>       
    
    <design:attribute name="targetObjName" label="Object Name" 
                      description="Object Name to load"/>    
    <design:attribute name="recordIdField" label="Record Id Field" 
                      description="Record Id Field to load" />
    
    <design:attribute name="recordFields" label="Record Fields" 
                      description="Record Fields to display"/>
    <design:attribute name="columns" label="# of columns" 
                      description="# of Columns for the layout"/>    
    <design:attribute name="mode" label="Display Mode" 
                      description="Display mode (edit, view, readonly)"/>            
    
    <design:attribute name="recordLayout" label="Record Layout" 
                      description="JSON Record Layout"/>
    
    <design:attribute name="recordActions" label="Record Actions" 
                      description="JSON Record Actions"/>        
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Visible Actions" 
                      description="# of visible actions"/> 
</design:component>

Last updated