Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 1Discover the latest updates and new features to Dynamics 365 planned April 2021 through September 2021.
Release overview guides and videos Release Plan | Preview 2021 Release Wave 1 Timeline
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
I have created a basic HTML file
<img alt="" src="data:image/png;base64,R0lGOD...base64 code" />
If I save the file to my desktop, then double click it the webpage opens in IE and displays a logo.
If I now add this as a webresource within Dynamics CRM the logo displays as a black square with a white cross in it - whats going on?
All I am trying to do is read the Base64 from a related entity and as the data in the entity changes display the related image.
As always any help appreciated.
Figured it partly out, I was editing the webresource directly in CRM and then saving it; I hadn't noticed that it was adding a Body tag in and because of this displayed the black box and white cross. Creating the file in notepad and uploading that to CRM the logo is displayed as expected.
Now I have some code:
var fileContents = "data:image/png;base64," + photodata;
var img = document.getElementById("WebResource_img");
img.src = fileContents;
This should upload the latest image when the record changes, all that happens is the existing logo disappears and is not replaced.
I've outputted the img.src as a string prior to updating it; now it is a path to the image as a file within CRM itself and after updating the string through the above code it it is set to the string in the original file.
I'm a little lost with what it is doing.
Here is a post with the solution: How to Display Image ... on Web Client In Dynamics 365
The code is very similar to what I had prior to creating a HTML webresource, however, adding the above as is goes through the motion - at least it doesn't error - but no image is displayed.
If it's a filepath / URL you don't have to add "data:image/png;base64,", just set the path as src
No its the Base64 that I have for the image and trying to display that.
Currently only way to display an image is to upload the image as a webresource - but as soon as I update the source for that image, it dissapears and no new mage is displayed.
Business Applications communities