Posting Invoice to Purchase Order

Hi everyone,

I am trying to post an invoice for a purchase order that has been received. I am trying to achieve this through web services or odata services. I would like to know how we can use the  codeunit 90/91 to achieve this job? Is it even possible as I am unable to see where i can pass which PO number to post invoice over codeunit 90 web service.

Secondly, the other way I was am trying is to use the "Purchase Invoice 51" to directly create an invoice however from front end we can associate receipts with that purchase invoice but through this service I am unable to find a way to associate receipts with the purchase invoice.

Any help would be great!


No Data
  • Hi,

    Even if you in theory just could publish codeunit 90, then it would not work. The problem is that it it has build in user dialog, which would not work via web services.

    My suggestion would be to build a new codeunit, which calls codeunit 90 with the parameters required. This way you can much better control what it is doing. 

    You can see a previous question about almost the same here:

    But which version of NAV is this? They have done some improvements in the web services area, that's the functionality they use to allow you to post an invoice from office 365.