web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Troubleshooting - adding icons and tooltips to grid columns

(0) ShareShare
ReportReport
Posted on by 240

Hello,

I want to show icons on my grid. What I am looking for is to show light bulb icons on my Urgency column (it would display red, green, or yellow bulbs depending on the level of urgency: 1,2,3,or 4.) 

I created the web resources in my default solution (where the entity lies); added in the images, and added the script. My script is written below. 

function displayIconTooltip(rowValue) {
var row = JSON.parse(rowValue);
var urgency = row.new_urgency_Value;
var resultarray = null;
var imgName = "";
var tooltip = "";
switch (urgency) {
case 1:
imgName = "new_RedBulb";
tooltip = "1 (Move to Top)";
break;
case 2:
imgName = "new_YellowBulb";
tooltip = "2 (Next Up)";
break;
case 3:
imgName = "new_GreenBulb";
tooltip = "3 (Low)";
break;
case 4:
imgName = "new_GreenBulb";
tooltip = "4 (Backlog)";
break;
default:
imgName = "";
tooltip = "";
break;
}
var resultarray = [imgName, tooltip];
return resultarray;
}

Yet when I add it to column properties and run it, nothing happens. Can someone troubleshoot this for me please. The urgency field is an option set. 

Thank you.

I have the same question (0)
  • Suggested answer
    sdfasdf Profile Picture
    842 on at

    Hi,

    It's quite difficult to understand why it is not working. I would strongly recommend you to follow the step-by-step instructions documented here to create this functionality: docs.microsoft.com/.../display-custom-icons-instead

    Once you get this working, you might want to compare the solution documented in the article with the one that's not working to see what may be causing the issue.

  • Aneeqa Pervaiz Profile Picture
    240 on at

    My code is exactly how it has been documented in the document.

    function displayIconTooltip(rowData, userLCID) {  

      var str = JSON.parse(rowData);  

      var coldata = str.new_urgency_Value;

      var imgName = "";  

      var tooltip = "";  

      switch (parseInt(coldata,10)) {  

        case 1:  

          imgName = "new_RedBulb";  {

          tooltip = "1 (Move to Top)";  

          break;  }

    break;

        case 2:  

          imgName = "new_YellowBulb";  {

          tooltip = "2 (Next Up)";  

          break;  }

    break;

        case 3:  

          imgName = "new_GreenBulb"; {

          tooltip = "3 (Low)";  

          break;  }

    break;

        default:  

          imgName = "";  

          tooltip = "";  

          break;  

      }  

      var resultarray = [imgName, tooltip];  

      return resultarray;  

    }  

    It still does not work! :/

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans