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 :
Microsoft Dynamics CRM (Archived)

Add Custom Icons to Dynamics 365 Columns in Views using web resources

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a requirement to show an icon (png file) in the grid based on different value of the column by using web resources, and it's working perfectly but when I added a partylist data type field into the grid, I will get error message Self referencing loop detected for property 'Entity' with type 'Microsoft.Crm.Metadata.EntityMetadata'. Path 'to_Value[0].EntityType.Metadata.PrimaryKey'... does any 1 facing the same problem? 

below is the javascript that I have..

function showindicator (rowVal, userlcid) {

    var imageName = "";
    var tooltipValue = "";
    var resultarray = null;

    try {

        //get the row Info
        var row = JSON.parse(rowVal);

        //get the Value of Custom Field (Column)
        var rsubject = row.subject;

        if (rsubject == null || rsubject == 'undefined' || rsubject.length < 1) return;

        //If yes then set exclamation icon
        if (rsubject == "new") {

            imageName = "new_imageA.png";
            tooltipValue = "";
        } else {
            return;
        }

        resultarray = [imageName, tooltipValue];
    } catch (e) {
        //Handle Error
    }

    return resultarray;
}


*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Jonas,

    The party-list field allows for multiple references to multiple entities including the entity which contains the party list field. This will cause a self-referencing structure.

    I don't think we can use icons with party list fields.

    Hope this helps.

  • Community Member Profile Picture
    on at

    Hi Nithya,

    I was adding script to the subject field only to use icon, no party-list field. I just want to display more columns in the grid, but once i put any party-list field into the grid, the system will gives me error.

    Regards,

    Jonas

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Jonas,

    Can you put a debugger in the function and see where the function is breaking?

  • Community Member Profile Picture
    on at

    Hi Nithya,

    I'm trying to put an empty function in the script, same error result. I will get like below error prompt before my script is fire.

    5146176.Capture.PNG

    Seem like web resource and party-list field cannot be put together in the same view despite the logic is not touching party-list field. 

    Regards,
    Jonas

  • Suggested answer
    sandeepstw Profile Picture
    4,601 on at

    Hi,

    Dynamically add image using js so create js function for complete logic.

  • cookyrag Profile Picture
    on at

    Im seeing this to , wonder if it will be fixed in 9.2?

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    This error occurs due party List field on Activity entities like emails, tasks, oppointments, etc.

    In latest version of MS CRM the issue is resolved.

    You can refer the post -https://mscrm16tech.com/.../

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans