Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I am on NAV 2018. Able to create Sales Order through the OData rest services. I need to modify the sales order in order change the "Tax_Area_Code" as the OData POST sales order doesn't work with "Tax_Area_Code". I am having difficulty understanding/using the etag returned by NAV.
Here is the etag returned when I create a sales order:
Here is a reference on how to use the etag value in PATCH request: (https://community.dynamics.com/nav/f/microsoft-dynamics-nav-forum/232296/odata---cannot-update-data-on-page--/674638) last reply.
Key is: If-Match
Value: W/"'<your etag>'"
in my case: W/"'JzUyO0pBQUFBQUNMQVFBQUFBSjcvMU1BVHdBdEFESUFNQUEzQURFQU1RQTRBRGNBQUFBQUFBPT05Ozc5NzM1NDIwNDA7Jw==\'"
What am I doing wrong? Please comment if I am using the etag value properly.
I don't think that is the error you get if you use etag in a wrong way, but i think you should fetch an updated etag before modifying the order.
etag is a sort of version of the record in the NAV/DBC table, and the idea behind it is to prevent someone changing the record while you are changing it. So you read the record and etag, modifies the data and asks NAV/DBC to update the record with your changes if the etag is unchanged. If etag is changed the error is sort of "someone else have changed the record, please do your changes again".
Anyway - please have a look at the blog post also mentioned in the link you provide (scblog.lynge.org/). Althoug it is in Danish (sorry about that - I'm one of the authors :-) ) It implements this in PowerShell and shows examples on how to insert, modify and delete a customer. So you can see exactly how it is done and test it yourself.
If you are familiar with powershell you should even be able to implement the change to want using the code - just for testing. And then you can look at requests/headers/body afterwards and implement the same in the language of your choice.
Business Applications communities