Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

OData Web Services read-only fields

(0) ShareShare
ReportReport
Posted on by 53

Using OData V4 and Dynamics NAV 2018 web service on table where the StartDateTimeOffset is a read-only field.  I create a new entity for the specified table and fill in the editable fields but not setting value for the read-only field.  I then add the new entity to the collection and try and savechanges(), only to get the error:

DataServiceClientException: {"error":{"code":"BadRequest_InvalidOperation","message":"Control 'Start DateTime' is read-only."}}

I have had this problem in other web service pages with read-only fields.  How to create a new web service entity and add to the collection if there are read-only fields?

  • Webz Profile Picture
    Webz 53 on at
    RE: OData Web Services read-only fields

    Thank you for a suggestion, however we do not have developer license and are looking for a work around that avoids getting a developer involved.  I have worked at modifying other ERP in the past such as Infor, but in other cases didn't have to pay someone so we can make internal modifications.

  • Verified answer
    JAngle Profile Picture
    JAngle 63 on at
    RE: OData Web Services read-only fields

    Perhaps creating a copy of the table and page but without any code or restricting properties. OnAfterInsert you could use the TRANSFERFIELDS function into the actual table you want to have the data in. If the field IDs between tables match exactly it will just move the data. Might skip out the issue

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,321 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans