Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

Which tables are affected when creating an order via the SOAP API?

Posted on by 5

Hello,
there are a lot of pages in NAV that have a reference to sales orders. See list below.

Which Pages do I need to populate if I want to create a customer orders via the API?

I have read elsewhere that these are only the pages salesorder_order and salesorder_orderline.

What about customer?

I use SOAP and C# and have no problems with writing and reading the API. I just don't know which tables to use.

List of pages related to orders:

order_headers
order_lines
salesorder_list
salesorder_orderSalesLines

salesorder_order
salesorder_orderline
customer

webshop_salesorder_order
webshop_salesorder_orderline
webshop_customer


salescredit_credit
salescredit_creditline
salesinvoice_invoice
salesinvoice_invoiceline








  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,744 Moderator on at
    RE: Which tables are affected when creating an order via the SOAP API?

    If the customer for the order is already in NAV you will only have to use the sales header and sales line tables.

    If the customer is a new customer you will have to create the customer in the customer table before you create the sales order.

  • Suggested answer
    Waltavista Profile Picture
    Waltavista 5 on at
    RE: Which tables are affected when creating an order via the SOAP API?

    stackoverflow.com/.../75246563

    Order and OrderLine should be enough to create the order. Credit is when you creating the return for items previously sold, and Invoice is a posted order (not editable).

    As for the customer, it depends whether you are willing to create customers or you are going to use some predefined one. Cuz customer is an essential field. So if you are going to create new customers you need to publish page for them as well. And this goes for any other entity that is related to order. Like Items or Accounts.

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 70,116 Super User 2024 Season 2 on at
    RE: Which tables are affected when creating an order via the SOAP API?

    Hi, In Web Service page, you should be able to find these custom pages and their Object ID.

    pastedimage1674775536705v1.png

    Then open Development Environment

    pastedimage1674775568117v2.png

    Find the ID:

    pastedimage1674775608046v3.png

    Right click and chosse Design (development license is required)

    pastedimage1674775675383v5.png

    Choose Property

    pastedimage1674775706379v6.png

    Then you can see source table

    pastedimage1674775725179v7.png

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    DAnny3211 Profile Picture
    DAnny3211 9,217 Moderator on at
    RE: Which tables are affected when creating an order via the SOAP API?

    hi

    you can use Page api in Dynamics nav (REST)

    community.dynamics.com/.../microsoft-dynamics-nav-2018-api-part-4-develop-custom-api

    DAniele

  • Waltavista Profile Picture
    Waltavista 5 on at
    RE: Which tables are affected when creating an order via the SOAP API?

    Thank you very much for your answers. I know there is no page "CustomerOrders". I added a list of all pages probably affected by creating an order below my post. SalesOrder_Order is linked to Customer with Sell_to_Customer_No and Bill_to_Customer_No

  • Mohana Yadav Profile Picture
    Mohana Yadav 58,878 Super User 2024 Season 2 on at
    RE: Which tables are affected when creating an order via the SOAP API?

    NAV does not have Customer Orders. Maybe you mean Sales Orders only.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans