Note: I originally posted this in the NAV Forum, but think BC is the better place for it.
Hi community,
I am exposing the codeunit 74 Purch.-Get Receipt as a webservice. My goal is to add purchase receipt lines to a purchase invoice via a webservice call.
This I want to achieve both with a SOAP request AND with an Odata request. (Reason: i have to set this up in a NAV16 and BC).
I gave the the webservice the name PurchGetReceipt.
Current Odata:
URL: api.businesscentral.dynamics.com/.../PurchGetReceipt_CreateInvLines DE'
Body: not sure what to put here.
Response: "Resource not found for the segment 'PurchGetReceipt_CreateInvLines'.
Current SOAP:
URL: api.businesscentral.dynamics.com/.../PurchGetReceipt
SOAPAction: urn:microsoft-dynamics-schemas/page/PurchGetReceipt:CreateInvLines
Body:
Response: Parameter purchRcptLine2 of the type INavRecordHandle in method CreateInvLines in service PurchGetReceipt is invalid!
I can't figure out how to construct the HTTP calls, neither in SOAP nor in OData in order to make this run.
Can you give me some pointers about the bodies and params I am missing.
I am attaching a screenshot of the codeunit, found in the AL Object Designer in Vscode.
Thanks Sven