I am trying to post Purchase invoice but getting co-relation error
Can somebody help me
Thank you, Daniele, for the response.
I am trying to post invoice against the purchase order do you have working request body for posting of invoice against purchase order.
Hi
delete the ID attribute in the body request, it will be assigned automatically by the system
this is ny example
WITH ID in request BODY:
WITHOUT ID IN REQUEST BODY:
check my answer if it helped you, thanks
DAniele
Search for Web Services page and click new
Select object type as Page and enter Object ID as30066 give it a name. in my case purchaseOrders
Set Publish boolean to true
Could you please elaborate more on publish the page 30066 in web services
Thank you for sharing.
Now I see below error.
Here is request body
{
"id": "fd041e73-67a3-ed11-9a88-0022481d0e9a",
"number": "106012",
"orderDate": "2022-04-13",
"postingDate": "2022-04-13",
"vendorId": "77b117ef-e06c-ed11-81b5-6045bd8e591f",
"vendorNumber": "20000",
"vendorName": ""First Up Consultants",
"payToName": "First Up Consultants",
"payToVendorId": "77b117ef-e06c-ed11-81b5-6045bd8e591f",
"payToVendorNumber": "20000",
"shipToName": "CRONUS USA, Inc.",
"shipToContact": "100 Day Drive",
"buyFromAddressLine1": "",
"buyFromAddressLine2": "",
"buyFromCity": "Chicago",
"buyFromCountry": "",
"buyFromState": "",
"buyFromPostCode": "",
"payToAddressLine1": "",
"payToAddressLine2": "",
"payToCity": "",
"payToCountry": "",
"payToState": "",
"payToPostCode": "",
"shipToAddressLine1": "",
"shipToAddressLine2": "",
"shipToCity": "",
"shipToCountry": "",
"shipToState": "",
"shipToPostCode": "",
"currencyId": "00000000-0000-0000-0000-000000000000",
"currencyCode": "USD",
"pricesIncludeTax": "",
"paymentTermsId": "86b017ef-e06c-ed11-81b5-6045bd8e591f",
"shipmentMethodId": "",
"purchaser": "",
"requestedReceiptDate": "2022-04-14",
"discountAmount": "",
"discountAppliedBeforeTax": "",
"totalAmountExcludingTax": "",
"totalTaxAmount": "",
"totalAmountIncludingTax": "",
"fullyReceived": "",
"status": "Open"
}
To post a purchase order you should use the bound action available in the Purchase order API as documented here:
You have to use the below link
api.businesscentral.dynamics.com/.../NAV.ReceiveAndInvoice
Publish the page 30066 in web services first
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156