Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Unanswered

Display custom icons

Posted on by 5

hi

What do I need to change in the code to fit my tables?

function displayIconTooltip(rowData, userLCID) {     
    var str = JSON.parse(rowData); 
    var coldata = str.opportunityratingcode_Value; 
    var imgName = ""; 
    var tooltip = ""; 
    switch (parseInt(coldata,10)) {
        case 1: 
            imgName = "new_hotlist_icon_red"; 
            switch (userLCID) { 
                case 1036: 
                    tooltip = "French: Opportunity is Hot"; 
                    break; 
                default: 
                    tooltip = "Opportunity is Hot"; 
                    break; 
            } 
            break; 
        case 2: 
            imgName = "new_Warm"; 
            switch (userLCID) { 
                case 1036: 
                    tooltip = "French: Opportunity is Warm"; 
                    break; 
                default: 
                    tooltip = "Opportunity is Warm"; 
                    break; 
            } 
            break; 
        case 3: 
            imgName = "new_Cold"; 
            switch (userLCID) { 
                case 1036: 
                    tooltip = "French: Opportunity is Cold"; 
                    break; 
                default: 
                    tooltip = "Opportunity is Cold"; 
                    break; 
            } 
            break; 
        default: 
            imgName = ""; 
            tooltip = ""; 
            break; 
    } 
    var resultarray = [imgName, tooltip]; 
    return resultarray; 

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,986 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans