NAV18: AL - WS/PS Sales Order: Create "Sales Header does not Exist"

maze93maze93 Member Posts: 24
Hi all,

I have created a copy of the Sales Order page called Sales Order WS in an extension and published as a web service called Sales_Order. The only difference between the standard page 42 and this page is that I have added "Bill-to Customer No." to the page.

However, when trying to create a new order via Powershell (with or without manual numbering) I get the following error:
"The Sales Header does not exist. Identification fields and values: Document Type='Order',No.='12234'"

I have tried adding the "Document Type" to the page and tried to set this to both "Order" and "1" without any luck, since the powershell script won't recognize document type as a field (No idea why). However, I would think that I don't need the "Document Type" field since I am publishing the Sales Order-page and it already seems to recognize the type of "Order".

Have anybody encountered this issue? Please see the attached images.

Thank you!



  • maze93maze93 Member Posts: 24
    Hi all,

    I ended up with creating a function called "CreateSalesHeader" - creating an empty header and then updating it using the standard functionality. Not the prettiest but it does the trick ...
Sign In or Register to comment.