Dynamics 365 CE: Display Entity Image to a View / Dashboard
Microsoft Dynamics 365 Entity Images enhances user experience. For example, users can upload images of the Accounts and Contacts they managed. However, users cannot directly display Default Entity image (or other image fields) to the views or dashboards.
In Dynamics 365, you can show icons within the views, this post extends same approach to show the Entity Image instead.
Problem
Display Entity image in a view / dashboard.
Solution
Use a JS Webresource to get the URL of Entity Image and use it with the view column. When we select a webresource in the column properties (of a view), it passes the Row Data and User Locale and expects image URL along with tool tip.
Without further ado, here are the steps:
- Create a Webresource with following properties:
- Name: new_displayEntityImage (you can name it as you want)
- Type: Script (JScript)
- Code:
function displayEntityImage(rowData, userLCID) {
var str = JSON.parse(rowData);
var imgName = str.entityimage_url_Value;
var tooltip = str.name_Value;
var resultarray = [imgName, tooltip];
return resultarray;
}
Please note, there is no need to retrieve entity image using webservice, Entity Image url is already available in entityimage_url_Value field of the rowData JSON. We just return the entity image url along with account name (as tooltip).
- For this example, I am updating an Account View (you can do same steps with your desired view).
- In the Account Name column properties, select the webresource we created and supply the function name:

- Now save the view and Publish.
Result
Entity Image is now displayed in the view:

Furthermore, you can include same view in a Dashboard as well:

That’s it, Quite Easily Done!
This was originally posted here.

Like
Report
*This post is locked for comments