Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

OData Web Service Create two records in one call

Posted on by 165

Hi there, is it possible to create two records in one web service call against an OData web service in NAV?

I would like to create more than one customer in one call, but I am not sure about the correct JSON structure to create both at the same time.

If one client is:

{ "Name":"Customer1"}

Two clients should be something like:

[{ "Name":"Customer1"},{"Name":"Customer2"}]

but the above is not working and I am not sure the correct format.

Could you help?

Regards,

Carlos

*This post is locked for comments

  • Verified answer
    I Gusti Made Ari Profile Picture
    I Gusti Made Ari 3,594 on at
    RE: OData Web Service Create two records in one call

    It doesn't support this.

    Option if you want to accept Json Array, you can create your own web service . This web service need to  call dynamics nav OData web service in the background for each  data in array to insert.

    another option to send in one call is using odata batch request, i never tried this.

    You may look on below :

    https://www.odata.org/documentation/odata-version-3-0/batch-processing/

    https://community.dynamics.com/nav/f/microsoft-dynamics-nav-forum/290071/web-api-odata-batch-request

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans