Hi,
I want to display whats ever in the header photo onto the form. I have the Web resource added to the form but i'm not sure what the code would look like. Any help?
*This post is locked for comments
Hi Amey,
This post is very old so i'm not sure why your image is fuzzy.
Could be the actual resolution of the image itself or it could be fixed with some html/css magic maybe.
I'm glad my code helped :)
Thanks for posting the code Thomas it was super helpful! How did you stop it coming out so fuzzy?
If anyone wants the complete code:
<html> <head> <style> </style> <script src="../WebResources/psd_/jquery_1.9.1.min.js"></script> <script> function load() { var imageUrl = window.parent.Xrm.Page.context.getClientUrl()+ "/image/download.aspx?attribute=entityimage&entity=" + window.parent.Xrm.Page.data.entity.getEntityName() + "&id="+window.parent.Xrm.Page.data.entity.getId() + "&Timestamp="+ new Date().getTime(); document.getElementById("customerAssetImage").src = imageUrl; } </script> <meta><meta><meta><meta></head> <body onload="load()" style="word-wrap: break-word;"> <img src="nothing.jpg" id="customerAssetImage" name="customerAssetImage"/> </body> </html>
Hi,
You can show entity image into web resource.
using this URL you can get entity image
var imageUrl = Xrm.Page.context.getClientUrl()+"/image/download.aspx?attribute=entityimage&entity="+ Your entity schema Name+"&id="+entity record Id+"&Timestamp="+ new Date().getTime();
you can show this image using Iframe in web resource.
Note: Image resolution and dimensions may be different.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156