Grid Manipulation using Client Side API

By | January 28, 2016

Using the Sage CRM Client Side API, we can easily change the grid look by applying some color code or something. Changing anything in CRM grid was bit complex and we had to use HTML codes to fulfill the requirement. But, now it has been changed by introducing Client Side API methods in Sage CRM.

New Stuff: Add Calendar Gadget in an Interactive Dashboard in Sage CRM

In below screenshot I have changed the Color of Description column on a certain condition where system will check the word “Description” and accordingly it will change the color.

Img1

Method Name: – filterWhere (value1, value2, value3)
This method provides ability to perform filter on grid data. As you can see above method requires three arguments.
Value1=Name of the column
Value2=filter operator
Value3=actual value
To get more clear idea on how to use the above explained method please find below code.
Code Snippet
<Script>
crm.ready(function(){
crm.grids().filterWhere(‘lead_description’, ‘contains’, ‘Description’).highlightCell(‘goldenrod’);
})
</script>
Paste the above code inside “Custom Content” of the list or grid.
Also Read:
1. SQL Error while trying to add column in company grid
2. What’s New – Creating Grids in Sage CRM to display Sage ERP X3 Data on real time basis using GUMU Customizer – II
3. Highlight All Grid Rows in Sage CRM v7.3
4. Adding Image Under Status Column on Grid
5. Client Side API to hide and show Column of grid