Thank you for visiting our Partner Zone. This area is an exclusive space for MYOB Partners. Find out how to Partner with MYOB.
September 2022
September 2022
I am getting the following error "A request should not contain UID during POST operation"
This is after I created an Item Invoice Header and then try and add Item Lines to the Invoice Header. This has worked for over 3 years. After I got the error I updated all the NuGet packages etc and still get the error. It is written in c# 4.5. Here is the code cut-down version of the code
ItemInvoice invoice = new ItemInvoice(); List<ItemInvoiceLine> lines = new List<ItemInvoiceLine>(); CustomerLink customer = new CustomerLink(); customer.UID = customerUID; invoice.Customer = customer; invoice.Date = Date; invoice.IsTaxInclusive = false; invoice.CustomerPurchaseOrderNumber = PurchaseOrder ; invoice.InvoiceDeliveryStatus = DocumentAction.Email; // Create Invoice Header invoice = ws.insertItemInvoice(invoice); // Add Invoice Lines to Invoice foreach (var orderline in orderLines) { ItemInvoiceLine line = new ItemInvoiceLine(); ItemLink item = new ItemLink(); item.UID = orderline.ItemUID; line.Item = item; line.Description= orderline.Description; line.ShipQuantity = (decimal)orderline.Quantity; line.UnitPrice = (decimal)orderline.SellingPrice; TaxCodeLink taxCode = new TaxCodeLink(); taxCode.UID = TaxUID; line.TaxCode = taxCode; lines.Add(line); orderline.SaleUID = invoice.UID; invoice.Lines = lines; var itemInvoiceSvc = new ItemInvoiceService(_configurationCloud, null, _oAuthKeyService); itemInvoiceSvc.InsertEx(companyFile, invoice, credentials); }
September 2022
September 2022
working again
September 2022
September 2022
Hi @al3,
Thanks for the update. Glad to hear that it is working again!
Feel free to come back to the Community Forum in future if you have anymore questions, we are more than happy to assist.
Cheers,
Melisa
MYOB Community Support
Online Help| Forum Search| my.MYOB| Download Page
Did my answer help?
Mark it as a SolutionHelpful? Leave a to tell others
September 2022
September 2022
Hi
The error is back
Error | Error.Name | Error.Message | Error.AdditionalDetails | Error.ErrorCode | Error.Severity | Error.LearnMore | |
MYOB.AccountRight.SDK.Error | UidInPostBody | A request should not contain UID during POST operation | 173 | Error |
March 2023
March 2023
Can you offer a solution.
I'm getting same issues with little help.
by
KILIQUIDWASTE
September
26
978
|
26
|
978
|
||
5
|
912
|
|||
by
Jodie-D
September
6
1003
|
6
|
1003
|
||
10
|
821
|
|||
18
|
2164
|