Search code examples
dynamics-crmmicrosoft-dynamicsdynamics-365

Dynamics CRM word template - inserting an image


In dynamics CRM (365 V9), I would like to insert an image in a word template. The source of this image is the entityimage field of the record (the image on top of the form). The problem is that this image is compressed, so if I increase its size in the word template the image quality is bad: how can I insert an image with full resolution (not compressed) in a word template?


Solution

  • Problem is entitimage in Crm is saved in 144px*144px. If you try to insert image of higher resolution Crm crops it down. Now what you can do is create a multi line text field and save image as base64 string. Even here you will face character length issue as multiline text take 1048576 characters. So you will have to take care of this limit as well because base64 can grow large.

    Now your main issue is how to convert this base64 back to image especially in word document. You will need some coding here, oob way is not possible.

    But I believe you atleast got idea how to proceed. Good luck exploring the business case.