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

Community site session details

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

Updating existing record in CDS via API

(0) ShareShare
ReportReport
Posted on by 10

I have seen an error recently with the CDS API when updating existing item in an entity when you have a field in the Patch request (so far I can only figure out 'msdyn_subject'). I'm testing out to update an existing item from the out of the box Project entity (msdyn_project). 

This is the error I received:

{
    "error": {
        "code": "0x80040265",
        "message": "We’re sorry. You cannot directly do 'Update' operation to 'msdyn_project'. Try editing it through the Resource editing UI in Dynamics or via Project."
    }
}

I tried to do the PATCH request via Postman, and if I removed the 'msdyn_subject' field from the request, the API works just fine. Anybody experiencing this issue?

For reference: (Highlighted below is the problematic field)

PATCH https://{ORGURL}.crm6.dynamics.com/api/data/v9.0/msdyn_projects(ab82672e-0bdd-470e-a4a6-1e9372601751)

BODY:

{
    "tdpd_prioritizationstrategicalignment": "441380005",
    "msdyn_subject": "Project Hub App",
    "tdpd_oneplanactuals": 0.0,
    "tdpd_prioritizationlowercost": "441380005",
    "tdpd_oneplanbenefits": 0.0,
    "tdpd_prioritizationrisk": "441380005",
    "tdpd_oneplanforecast": 0.0,
    "tdpd_oneplanbudget": 0.0,
    "tdpd_prioritizationimproveemployeereten": "441380005"
}
I have the same question (0)
  • cloflyMao Profile Picture
    25,210 on at
    RE: Updating existing record in CDS via API

    Hi Williams,

    From those two articles:

    https://pwmather.wordpress.com/2020/01/06/extending-projectfortheweb-part4-ppm-cds-msdyn365-powerplatform-msproject-powerapps-powerautomate/

    https://microsoftproject.uservoice.com/forums/914203-project-for-the-web/suggestions/40247386-allow-currency-fields-in-project-for-the-web

    They said that the error is caused due to there is a Currency type field for Project entity.

    However, I added a custom currency field Estimated Value to my Project entity and the PATCH request is still able to be executed successfully.

    pastedimage1600237929914v1.png

    Is there a custom currency field in your Project entity or as the first article mentioned, is there any pre-validation event handler as the part of your Project entity?

    (It seems that all tdpd prefix fields are custom fields.)

    Can you run a simple update operation successfully? e.g: only updating msdyn_subject field.

    Regards,

    Clofly

  • dwilliams123 Profile Picture
    10 on at
    RE: Updating existing record in CDS via API

    Thanks for your reply. As I have mentioned above, if I removed 'msdyn_subject' from the request body, it works successfully. The issue is the 'msdyn_subject' property when it's part of the request body then it throws that error (I have tried updating 'msdyn_subject' by itself, and it gave the same error). Once it is removed, its all good with the update to the custom fields or whatsoever.

  • cloflyMao Profile Picture
    25,210 on at
    RE: Updating existing record in CDS via API

    Hi Williams,

    Could you share server and client version of your Dynamics environment?

    Regards,

    Clofly

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 235

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 175

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 156 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans