› Dynamics 365, Enterprise › Add Custom Icons with tooltip for a column
Add Custom Icons with tooltip for a column
Now, it’s possible to make your CRM views visually more informative. This is a cool new feature which is in preview for Dynamics 365 for December 2016 release.
The following 2 new attributes have been added to layoutxml of savedquery –
Following is how you can add Icons to the columns:
In this example, I will add 3 types of images to the Open Opportunity View and based on whether the Opportunity is Hot, Warm or Cold, I’ll display a different emoji representing each.
1. Take 16×16 images and upload them as Web Resource in Dynamics 365. In my example, I’m using a “happy” and “sad” emoji to represent if the Opportunity is Hot or Cold.
In the above code, row object and the User’s LCID is passed as parameters. I’m selecting the image to be displayed (Web Resource names of the images in D365) based on the value in str.opportunityratingcode_Value.
3. Once I have this code ready, I’ll import this JS as a Web Resource in D365.
4. I’ll navigate to the view I want to add this functionality to and double click the column to edit the property of the column as shown below:
5. In the above example, I’m selecting my JS Web Resource new_IconInCols and the function as displayIconTooltip.
6. Once everything is set, I’ll publish all the changes and refresh my view with relevant data.
7. Finally, my data looks like this on the View:
Hot = Happy
Warm = Neutral
Cold = Sad
8. Also, if you hover over the icon itself, you’ll see what tooltip it has –
Hope this was helpful!
Liked it? Share it.