web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Updating Virtual Entity Record from Javascript using web api query gives error

(0) ShareShare
ReportReport
Posted on by 20

Hi Guys, 

I am having this issue with updating data from Azure SQL . I created a virtual entity in dynamics to retrieve data from azure sql , data is displayed but I want to update a field from this entity. I created plugins for retrieve, update and retrieve multiple. But when I want to update the record, I get the following error: 

This is the error in browser console: "PUT https://xxxxxxxx.powerappsportals.com/_api/abcd_custompersons(XXXXXXXX-6XXX-4XXX-AXXX-XXXXXXXXXXXX)/updatedemail 400 (Bad Request)

entity name: abcd_customperson

field: updatedemail (it is just a text field )

This is the error code: "9004010D" and the message: "Common Data Service error occurred." 

This is my code for updating 

 webapi.safeAjax({ 
        type: "PUT",
        url: "/_api/abcd_custompersons("   guid   ")/updatedemail",
        contentType: "application/json",
        data: JSON.stringify( {"value": email }),
        success: function (res) {
            console.log(res);
        },
        error: function (res, exception) {
            console.log(res.status   exception);
        }
    });

this entity has table permission in portals to read and write . 

Hope you can help me or give me an idea that i can try it. 

I have the same question (0)
  • Guido Preite Profile Picture
    54,086 Moderator on at

    I would try with the PATCH syntax instead of the single property update you ate doing

  • Victor carlos Profile Picture
    20 on at

    I have tried with PATCH , but still not working

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 153

#2
ManoVerse Profile Picture

ManoVerse 147 Super User 2026 Season 1

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 66 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans