web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Unable to Create Purchase Order Line using Nav 2016 Soap Services

(1) ShareShare
ReportReport
Posted on by 4
Trying to create a purchase order via the SOAP webservices for Nav2016, however stuck on the following error.
 
 
There is no Purchase Line within the filter.  Filters: Document Type: Order, Document No.: POXXXXX)
 
Code below, looks fine to me , so wondering if its a configuration on the clients system.
 
Purchase_Header po = new Purchase_Header();
po.Buy_from_Vendor_No = /TEST01/;

po.Vendor_Invoice_No = /TEST0101/;
po.Document_Date = DateTime.Now;
po.Posting_Date = DateTime.Now;
 
Purchase_Order_Line[] ArrayPOLines = new Purchase_Order_Line[1];
Purchase_Order_Line poLine1 = new Purchase_Order_Line();
 
poLine1.Type = NavPurchaseOrderHeader.Type.Item;
poLine1.No = /100477/;
poLine1.Qty_to_Receive = 20;
poLine1.Direct_Unit_Cost = 100;

ArrayPOLines[0] = poLine1;
po.PurchLines = ArrayPOLines;
 
 
Thanks in advance
 
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    99,313 Super User 2026 Season 1 on at
    I'm not sure. It seems that after the Purchase Header is created, there is no commit, and then the Purchase Line is created directly. So this error occurs.
     
    Hope this gives you some tips.
     
     
    Thanks
     
    ZHU
  • JSmith00887 Profile Picture
    4 on at
    Thanks Zhu
     
    I create the PO Header
     
    Then i add the purchase lines as an array and update but that is where i get the error.
     
    Purchase_Header PoHeader = new Purchase_Header();
    PoHeader.Buy_from_Vendor_No = "TEST";
    PoHeader.Document_Date = DateTime.Now;

    PurHeaderClient.Create(ref PoHeader);

    PoHeader.PurchLines = new Purchase_Order_Line[1];
    PoHeader.PurchLines[0] = new Purchase_Order_Line();

    PurHeaderClient.Update(ref PoHeader);
     
    The line in bold gives me the error of 
     
    There is no Purchase Line within the filter.
     
    Filters: Document Type: Order, Document No.: XXXXX
     
     
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,947 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,120 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 628 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans