Dynamic SVG icons for custom entities in Model-driven PowerApps
Submitted byAnonymouson03-02-202001:47 AM
Since we can now use SVG for custom entities in Model-driven PowerApps, it would be good if the SVG could dynamically use the accent color defined in D365 CSS rather than a static color.
Nowadays if you use a fixed color on the SVG it will be inconsistent with other entity icons.
For example if you use the color Black or #FFFFFF it will show as black in the SiteMap of the PowerApp which is great but it will show as black as well on the custom entity lookup fields which is inconsistent since standard lookup fields show the icon with the accent color (blue in most cases).
This is that inconsistency which I report in this forum post:
My suggestion would be that by default if you don't specify a fill color on the SVG, the system shoul add the same class as standard lookup icons hence coloring the app dynamically depending on where it has to be displayed (Sitemap, mobile app, lookup icon on a form etc....)
If you specify a fill color then it retains that fill color and does not apply the CSS class.
This is to allow flexibility and consistency when designing model-driven PowerApps with custom entities.