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 :
Microsoft Dynamics AX (Archived)

Updating an Entity via OData End Points

(0) ShareShare
ReportReport
Posted on by

Hi all,

I'm trying to update a Dynamics entity via the OData End Points.  The console application is throwing an error when I go to save the entity and the return message says something along the lines of ...

"update not allowed for field 'xyz'"

I currently fetch a single object from the OData end points by filtering it via property values and then I set the entity property I need to change to the desired value.

var entity = context.XYZ.AsEnumerable().FirstOrDefault(x => x.email == email);

entity.propertyToUpdate = "hello world!";

context.UpdateObject(entity);

context.SaveChanges();

 

 Could there possibly be a property I need to change in the entity somewhere or in Dynamics?

 

Thanks you!

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    239,084 Most Valuable Professional on at

    If you call SaveChanges() without any argument, it will update all fields, not just the one you set. And it seems that one of them, 'xyz', doesn't allow updates.

    Try calling SaveChanges with SaveChangesOptions.PostOnlySetProperties.

  • tek9iner Profile Picture
    on at

    Hey Martin - Thank you that solved it.  2nd time you saved me.  I owe you a beer or two.  Cheers!

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans