Adding custom content to a grid or list

This example shows how to add highlighting to a list of quotes returned from a search. The highlight is applied to different parts of the grid depending on the quote value being over 1000, 10000, and where the quote is active.

  1. Click <My Profile> | Administration | Customization | Primary Entities | Quotes | Lists | Quotes Grid.
  2. Add the following script in Custom Content.
    Copy
    <script>
    crm.ready(function()
        {
            crm.grids('0').rows(':gt(0)',true) .filterWhere('quot_grossamt','ge','1000') .highlightCell('yellow');
            crm.grids('0').rows(':gt(0)',true) .filterWhere('quot_grossamt','ge','10000') .highlightCell('#E8D7FD');
            crm.grids('0').rows(':gt(0)',true) .filterWhere('quot_status','eq','Active') .highlightCell('green');
            
        });
    </script>
  3. Save. When you search for a quote, the resulting list shows different highlighting on the list items.