Skip to main content

Notifications

Service | Customer Service, Contact Center, Fie...
Suggested answer

How to update entity image field on the form 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
    Steve Zhao2 Profile Picture
    Steve Zhao2 on at
    RE: How to update entity image field on the form using java script

    Hi Sandy94,

    formContext.getAttribute("<field>").setValue() can't support image field. Please refer to this doc:

    setValue (Client API reference) - Power Apps | Microsoft Learn

    If you want to upload image with JS, you need send a http request. Please refer to this doc:

    Image columns (Microsoft Dataverse) - Power Apps | Microsoft Learn

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,219 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans