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:
And this is what rowData has in the related entity:
Any ideas on how this could work on the related entity view?