Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Unable to Set contact image in CRM Portal online

Posted on by Microsoft Employee

Hi

I want to display dynamics CRM contact image in my online Portal.

Below are the methods i tried

1) By fetching the entityimage field using liquid template which returns System.byte[ ] and when i convert it to base64 the result is not the expected base64 value of the image.

Below is the fetch i used in web template

Entity-Image-Fetch.png

2) Couldn't trigger script or plugin on change of contact image to get the base64 and store it in hidden field

3) Created Entity Form Metadata for contact and tried to access it in Web template. but no success

Entityimage_5F00_metadata.png

Kindly help me to proceed

Any suggestion is appreciated

Thank you :)

*This post is locked for comments

  • Saddamk206 Profile Picture
    Saddamk206 777 on at
    RE: Unable to Set contact image in CRM Portal online

    Hi ,

    Please try this:-

    http://saddamk.blogspot.com/2018/10/display-image-of-product-in-dynamics.html

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Unable to Set contact image in CRM Portal online

    Hi Hino,

    Please share your workaround here so that it can help others facing the same issue. You can also mark that as helpful and close the thread.

  • Rizwan Aarif Profile Picture
    Rizwan Aarif 480 on at
    RE: Unable to Set contact image in CRM Portal online

    Hi Hino,

    Can you please share the complete code snippet. I don't see the functions which you used i.e. GetImage() and getRecordId() in your example code.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to Set contact image in CRM Portal online

    Thanks for the work around.  I wish though we could include the Image field onto the portal web form so the user can upload and manage their image rather than us having to upload it and then rig a way to get that data to the portal.  Seems backwards to me

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to Set contact image in CRM Portal online

    Hi Conterio

    I tried a workaround.

    On window.onunload of contact form i call a function which gets the contact image's base value and sets in a multi-line text field.

    And in the portal side, i set the image by getting the base value from multi-line field.

    CRM: In the below script i call hsl.GetContactId function on load which calls hsl.GetImage on window unload

    ty.png

    Web Template:  

    ty.png

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to Set contact image in CRM Portal online

    If you ever figure this out, I would like to know your solution.  Thanks!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Unable to Set contact image in CRM Portal online

    Thank you Alok. I cldnt trigger js on change of any of the field created for entity image and the form save event  is not triggering on updating and saving the contact image.

  • Dynamics_Alok Profile Picture
    Dynamics_Alok 1,746 on at
    RE: Unable to Set contact image in CRM Portal online

    Please look this blog.westmonroepartners.com/entity-image-adding-images-to-dynamics-crm-data-types .It may help you .

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans