We want to create returns via REST APIs. We have published a customization package for this. Technically, this is how the customization package works:
- Creates a blank RC order
- Trigger SalesOrderAddInvoice action to add products from the invoices
- Update RC with relevant quantities
The above process works for the first RC.
Any further RC creation from the same invoice throws the below error:
"The return quantity exceeds the quantity available for return for the related invoice line <INVOICE_NBR>. Decrease the quantity in the current line,
or in the corresponding line of another return document or documents <RETURN_NBR> that exist for the invoice line."
This is the similar error we usually see on Acumatica UI when adding the same inventory from an invoice. However, we can create the RC from the UI by modifying the quantity.
Is there anyway to fix this issue?
We are on Acumatica 2022 R1.
Best answer by Dmitrii NaumovView original