Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to update or set a field of image data type using java script

Posted on by 10

Hi Guys,

I have created a custom field on image data type and map it on entity main form. On click of custom entity ribbon an API to external system will be triggered and response will be processed. In the API response, there is image coming in Base64 format. Requirement is to update the image field on the form with the image coming from API in Base64 format.

Is there any way to set the image field via java script, just like how the fields will be set for other datatypes (Ex- formContext.getAttribute("<field>").setValue());

Thanks in advance !

-Sandeep

  • Suggested answer
    Guido Preite Profile Picture
    Guido Preite 54,081 Super User 2024 Season 1 on at
    RE: How to update or set a field of image data type using java script

    afaik not possible to do with Xrm scripting (as the one you mentioned) you can update the value using the Web API. For the exact code you can use my tool Dataverse REST Builder, or you use the specific "Manage Image Data" request type or the "Update" request (as you have the base64 value) to update the specific image field.

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!

Community AMA December 12th

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

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 229,993 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans