Maintain Columns in Manage Products Card

Add or remove columns from the Manage Products Grid.

Required Editions

You can configure these Lightning web components:

  • Promotion Card - Products
  • Trade Planning

Available in: Lightning Experience

Available in: Enterprise and Unlimited Editions where Consumer Goods Cloud is enabled

  1. From Setup, go to Object Manager, and then find and select Product.
  2. Click Field Sets, and then go to or create the ProductDescriptionFields field set.
    • If you want this new field in all sales orgs, use the cgcloud_ProductDescriptionFields field set.
    • If you want this new field in a specific sales org, use the ProductDescriptionFields_<sales org name> field set.
  3. Add the new field to the field set.

    Ensure that the field is a direct Product2 field. You can’t add any lookup traversals.

  4. In Lightning Page Builder, on the component instance, modify the Products Grid Configuration design property.
    This property is a JSON object that defines the product attributes that are shown when the grid is rendered. The format is:
    [ // An array of objects
      {
        "column": {  // Each record is an object with a "column" definition
           "source": [  // The list of fields that create the column. 
                        // The values of the fields will be concatenated
                        // Fields must be present in the "ProductDescription" fieldset.
            "Consumer_Goods_Product_Code"  // Field names are specified 
                                           // without namespace and withouth the
                                           // trailing "__c" 
          ],
          "headStyle": { // Column Header style
            "width": "5%", // Width. Sum of all width of columns must not exceed 100%
            "textAlign": "center" // Text Alignment.
                                  // Possible values are: center, left, right, justify
          },
          "cellStyle": { // Value cell style
            "textAlign": "center"// Text Alignment.
                                 // Possible values are: center, left, right, justify
          },
          "metadata": { // Only used if you want to display an icon instead 
                        // of a text value. Do not set this property otherwise
            "type": "icon", 
            "icon": "check" // SLDS icon name
          },
          "sorting": { // Sorting configuration. Optional
            "summary": { // Summary grid. Displayed on the card.
              "ascending": true, // If the default sort is ascending or descending
              "active": false, // if the grid is sorted by this column by default
              "sortable": true // if the column is sortable (click to sort)
            },
            "fixed": { // Fixed products grid. Displayed on "Add Fixed Products"
              "ascending": true,
              "active": false,
              "sortable": true
            },
            "dynamic": { // Dynamic grid, displayed on "Manage Products"
              "ascending": true,
              "active": false,
              "sortable": true
            },
            "search": { // Search grid, displayed when searching products by field
              "ascending": true,
              "active": false,
              "sortable": true
            }
          }
        }
      }
    ]

    Ensure that the specified structure complies with these limitations:

    • Product2 fields specified as the source are set without namespace for cgcloud manage package fields.
    • Product2 fields specified as the source are set without the trailing __c of the field name.
    • Product2 fields are direct Product2 field values as no lookup traversals are supported. For example, you can’t add MyLookup__r.MyField__c.
    • The sum of the widths of all columns is 100%.
    • The metadata attribute is specified only to show a column value as an icon. To see the icons included in Salesforce Lightning Design System, see SLDS icons.
    • The sorting attribute is optional. A column can’t be sorted if this value isn’t specified.

    Different views on the Manage Products grid can have different sorting configurations. To show multiple component instances conditionally based on User or Record fields, use the Lightning Page Builder Component Visibility Filter feature.