GM - Record Layout (LWC)

(gmpkg:RecordLayoutLWCComponent)

Documentation

GM - Record Layout (LWC) component is used to display a related object using a layout configuration same as GM - Record Layout. It bypasses the limitation of Salesforce UI API. This component can be used to manipulate any Salesforce object especially Event and Task.

Use case: Display the event details when expanding a record from open activities related list.

Specification

GM - Record Layout (LWC) component has the same properties as GM - Record Layout. However, it provides more capabilities in terms of styling. Section header can be hidden and each field can be styled by setting the variant, the border, the label styling and the value styling. The styling capabilities are useful on a community website for instance. Below is a configuration to showcase the styling:

{
    "density": "comfy",
    "sections": [
        {
            "name": "contactInformation",
            "label": "Contact Information",
            "variant": "header-hidden",
            "active": "always",
            "cols": 1,
            "rows": [
                [
                    {
                        "apiName": "Name",
                        "variant": "label-hidden",
                        "style": {
                            "label": "font-size:large;color:red",
                            "value": "font-size:large;text-align:center;color:green",
                            "border": "none"
                        }
                    }
                ],
                [
                    {
                        "apiName": "gmpkg__Image_Test__c",
                        "variant": "label-hidden",
                        "style": {
                            "value": "text-align:center",
                            "border": "none"
                        }
                    }
                ]
            ]
        }
    ]
}

API Reference

Last updated

Was this helpful?