Announcements
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
Missed that first line. No problem if you cross post in another forum. Hope you get the reply you need.
yes that is what i have written in the beginning of my post. i just do not know how to remove the post in the NAV forum.
This is a duplicate of posting:
community.dynamics.com/.../how-to-figure-out-soap-body-odata-body-of-exposed-codeunit-webservice
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156