Regarding API in NAV 2018 (Purchase Order, Sales Order)

sulav.thapaliya@agile.com.np
Member Posts: 8
I am trying to use sales order and Purchase order API in NAV 2018. I have been able to pass the data in header using postman. But I do not see any line items while getting the data from NAV. Is there any process on viewing the line items in JSON format?
0
Answers
-
Are you using the standard purchase order & sales order page or have you customized a new page for the API?0
-
I have created a purchase order API page and it's listpart page from purchase header and purchase line.I have manage to pass the data in header only but I am getting confused on how to pass the data in line.0
-
You do multiple calls. First header then lines.
https://docs.microsoft.com/en-us/dynamics-nav/fin-graph/api/dynamics_create_salesorderlineFollow me on my blog juhl.blog0 -
Hi Sulav,
you can do deep inserts trough the navision API, see following post for info regarding your custom page:
https://forum.mibuso.com/discussion/72423/api-deep-insert-not-working-in-custom-entity
info regarding deep insert:
https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/web-api-basic-operations-sample#section-3-create-related-entities-deep-insert
Regards,
foo0 -
To see the line items you need to expand them when you do GET
ex: http://{{url}}/{{service}}//API/beta/companies({{companyId}})/SalesHeader?$expand=SalesLine0 -
To pass data into the line you just use JSON array. The body would look something like this.
ex:
{
"number": "123456"
"salesLine": [
{
"number": 123456,
"lineNumber": 10000
}
],
}0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions