Posted in CRM, JavaScripts

Adding Custom Icons and ToolTip to Dynamics 365 Columns in Views

Adding Custom Icons and ToolTip to Dynamics 365 Columns in Views

With Dynamics 365 we can add custom icon and tooltips to the fields in Views. We can add it using the JavaScript through Web resource.

Follow the steps below to achieve this:

add 3 Web resources  as Png with names as “new_silver” & “new_golds”  & “new_diamonds” icons to webresource in Dynamics CRM.

3

 

Add the below Javascript webresource “new_Categorychange.js” in Dynamics CRM:

//rowval automatically comes fr0m the data
function getRowInfo(rowVal){
debugger;
var imageName = "";
var tooltipValue = "";
var resultarray = null;
var row = JSON.parse(rowVal);
var rdata = row.new_category_Value;
 
 switch(rdata){
 case 1:
 imageName = "new_golds";
 tooltipValue = "Golds";
 break;
 case 2:
 imageName = "new_silver";
 tooltipValue = "Silvers";
 break;
 case 3:
 imageName = "new_diamond";
 tooltipValue = "Diamonds";
 break;
 }
resultarray = [imageName, tooltipValue];
return resultarray;
}

rowval: Row Information will comes from the grid view

Entity name is “Custom”

  1. Navigate to Settings → Customizations → CustomEntity→ Views
  2. Open the “Custom Active” view.
  3. Select the “Category” column and click Change Properties. After this you will reach to “Change Column Properties” as seen in the below screenshot:21

Output:

4.JPG

Advertisements

One thought on “Adding Custom Icons and ToolTip to Dynamics 365 Columns in Views

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s