Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Add custom icons to a list view and bring field on related entity view

(1) ShareShare
ReportReport
Posted on by 10

Happy new year to everyone,

I have written the javascript and created the necessary web resources to add custom icons to a list view for an option set field.
It works great on the view of the entity that this field belongs to.
The problem is I wanted this field on a related entity view, as a column but this functionality does not work on the related entity view. 
This is my code:

function displayIconTooltip(rowData, userLCID) {
var str = JSON.parse(rowData);
var coldata = str.ktp_comparesizings_Value;
var imgName = "";
var tooltip = "";
switch (parseInt(coldata, 10)) {
case 958850000:
imgName = "ktp_GreenIcon";
switch (userLCID) {
case 1032:
tooltip = "Πράσινο";
break;
default:
tooltip = "Green";
break;
}
break;
case 958850001:
imgName = "ktp_AmberIcon";
switch (userLCID) {
case 1032:
tooltip = "Κίτρινο";
break;
default:
tooltip = "Amber";
break;
}
break;
case 958850002:
imgName = "ktp_RedIcon";
switch (userLCID) {
case 1032:
tooltip = "Κόκκινο";
break;
default:
tooltip = "Red";
break;
}
break;
default:
imgName = "";
tooltip = "";
break;
}
var resultarray = [imgName, tooltip];
return resultarray;
}


This is what rowData has in the entity that the field belongs to:
pastedimage1641195496030v2.png

And this is what rowData has in the related entity:

pastedimage1641195390400v1.png

Any ideas on how this could work on the related entity view?

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans