Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming 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