Releases: jongpie/CustomMetadataSaver
Releases · jongpie/CustomMetadataSaver
Unlocked package release
New 'custom metadata table' lightning web component
Initial beta release of a new lwc datatable that's designed to handle custom metadata type (CMDT) records
Using custom-metadata-table
component
The component can be used within screen Flows or within other lightning web/aura components. It requires 3 parameters:
records
- an instance ofList<SObject>
in Apex, or a 'record collection' within Flow, containing the CMDT records to display within the table. All of theSObject
records must be of the sameSObject Type
. You can create or query the list of CMDT records - see README for details on how to create CMDT records in Apex and All CMDT records must have both fieldsDeveloperName
andMasterLabel
populated in order to successfully deploy the new records.fieldsToDisplay
- a comma-separated list of field API names that should be shown in the table. When the paremeterenableEditing == true
, all fields, exceptDeveloperName
and lookup fields, will be editable within the table. This is done via thelightning-datatable
's inline-editing functionalityenableEditing
- Boolean value to control if CMDT records are displayed in read-only mode (enableEditing == false
) or with inline-editing enabled (enableEditing == true
)
Once the table is configured, it displays the CMDT records in a lighting-datatable
component
When users edit 1 or more fields, the standard Save
and Cancel
buttons are automatically displayed on the lightning-datable
component:
- When a user clicks
Cancel
, any unsaved changes to the CMDT records are discarded, and all field values are reverted to their original value. - When a user clicks
Save
, a loading-spinner is displayed to prevent any additional changes while the CMDT records are deployed asynchronously to the current org. Once the deployment finishes (either by successfully deploying the CMDT records or by failing due to an error), then the component removes the loading-spinner-icon, and users can resume interacting with the component.
Known Issues/Limitations
- Picklist fields are not currently properly rendered as a picklist - this PR's code renders them as a text field, which works, but this needs to be addressed in a future
New
button/action to create a new CMDT record from within the table- Column sorting functionality is not currently implemented