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

Wrong color for custom entity SVG icon

(1) ShareShare
ReportReport
Posted on by 870
Hello,
When creating custom entities we can set a custom icon for that entity to differentiate from other custom entities.
So I created a "Project" entity and set a custom svg file as icon (see svg below).
7345.pastedimage1580637308787v3.png
- It does render correctly in the app navigation --> icon is black on grey background, just like standard icons (see attached screenshot)
- It does render correctly in the mobile app --> icon is white on black background, just like the standard icons (see attached screenshot)
BUT it does not render correctly on the lookup fields on the forms --> icon is black while it should take the accent color defined by the theme just like the standard icons.
mobile_2D00_icon_2D00_ok.png left_2D00_navigation_2D00_ok.png
I did a bit of research and it seems D365 uses 2 different mechanisms to render standard entities icons and custom entities icons for lookup fields:
- Standard is implemented as a .woff file that is used in CSS to render the correct icon which you can download using the following URL on your organization: https://YOURCRMORG.crm.dynamics.com/uclient/resources/styles/CRMMDL2.woff?v=1.3.378-2001.1
- Custom is directly referenced as svg file in an img tag.
pastedimage1580637128832v1.png
I see that in both case it applies the CSS color property but it does not render correctly for the custom entity icons, so I suppose the svg file should be adapted in order to be handled correctly and get the correct color via CSS.
lookup_2D00_css_2D00_ko.png
I checked the documentation and found that article but it does not mention what the prerequisites are for the SVG files to be used in UCI, like for example the fill color that should be used.
Also found out other fellow community members raised the problem on that blog post:
Can you advise how I can have consistent color between standard and custom entities icon colors in lookups please?
THanks very much!


  
    
  
  • AlexMcL Profile Picture
    AlexMcL 8 on at
    RE: Wrong color for custom entity SVG icon

    Hi Ben

    Totally agree with you on this. I dislike the inconsistency. It just seems like more dev effort to have different methods for OOB and customer icons rather than a single way of displaying.

    I've also upvoted your idea.

  • ScheumanRJ Profile Picture
    ScheumanRJ 76 on at
    RE: Wrong color for custom entity SVG icon

    Ben,  Thanks for creating this thread.  I waisted too much time trying to figure out what I was doing wrong before I found this.  Also, thanks for creating the "User Voice" idea post - I've up voted it.  

  • Suggested answer
    Benoit Delvaux Profile Picture
    Benoit Delvaux 870 on at
    RE: Wrong color for custom entity SVG icon

    Hello Max,

    No solution found so far.

    I opened a ticket at MS and the only solution they could propose was to submit an idea, which I actually did:

    powerusers.microsoft.com/.../485486

    Apparently they do not take UX and consistency too seriously. The problem is that when you build PowerApps / Dynamics 365 solutions you're dependent on the consistency of MSFT and in this case impacted by the LACK of consistency.

    Do not hesitate to upvote, maybe it will be taken into account in 2-3 years :D

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Wrong color for custom entity SVG icon

    I am facing the same issue.

    Did someone find a solution for this problem?

  • Suggested answer
    necsa Profile Picture
    necsa 3,455 on at
    RE: Wrong color for custom entity SVG icon

    Hi,

    Please read following links to change SVG color. maybe you will get some idea.

    css-tricks.com/.../

    stackoverflow.com/.../how-to-change-the-color-of-an-svg-element

    css-tricks.com/.../

    css-tricks.com/.../

  • Benoit Delvaux Profile Picture
    Benoit Delvaux 870 on at
    RE: Wrong color for custom entity SVG icon

    Hello Necdet,

    Thanks for the pointers.

    I tried using Metro Studio utility to generate the SVG but it is forbidden by my company policies to install that utility.

    Anyway I don't think it will solve the issue because in the blog post I notice the same inconsistency as for me:

    pastedimage1580656486487v1.png

    You can see that the Location entity icon is BLACK while it should have the same BLUE color as the lookup value "01 - Scranton" if we compare with a standard Lookup field.

    So I guess there's something else to be done when using SVG files with custome entities.

    Best,

  • Suggested answer
    necsa Profile Picture
    necsa 3,455 on at

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,489 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