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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Unable to update DataEntity using OData

(0) ShareShare
ReportReport
Posted on by 5

Getting exception in OData Integration which updating Data entity at client.

I'm using the DataServiceCollection as shown below but getting exception at context.SaveChanges(SaveChangesOptions.PostOnlySetProperties).


// Assume that BatchOrder is entity name

var query = from BatchOrder in context.BatchOrders where BatchOrder.Sent == NoYes.No select BatchOrder; DataServiceCollection<BatchOrder> batchOrders = new DataServiceCollection<BatchOrder>(query); foreach (var batchOrder in batchOrders) { // do some processing on the batchOrder record here // update AX record batchOrder.Sent = NoYes.Yes;
  context.UpdateObject(batchOrder); } // send changes to the AX records back to AX context.SaveChanges(SaveChangesOptions.PostOnlySetProperties); // getting exception on this line


error
is like below

Message = "An error occurred while processing this request."
Response = {Microsoft.OData.Client.DataServiceResponse}

StackTrace = " at Microsoft.OData.Client.SaveResult.HandleResponse()
\r\n at Microsoft.OData.Client.BaseSaveResult.EndRequest()
\r\n at Microsoft.OData.Client.DataServiceContext.SaveChanges(SaveChangesOptions options)
\r\n at FixedAssetsIntegration...

It was working before but now it is giving error although nothing is changed, May be there is any update. Right now current Prod environment Version is: 10.0.31 (10.0.1406.165) and Platform release is PU55 (7.0.6651.135)

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 264 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 219

#3
Subra Profile Picture

Subra 164 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans