Error while cancelling backordered orders
We have job to cancel the backordered lines of an order. Basically it will call the OE_ORDER_PUB.Process_Order procedure for each line that needs to be cancelled. But for a couple of orders it is not cancelling certain lines due to the following error message whereas other lines for the same orders are getting cancelled successfully.
"This sales order line is referenced by Return Line(s). Please delete the Return line or clear the sales order reference from the Return line before proceeding with the cancellation."
Can you please let me know what needs to be done in order to avoid this and get those lines cancelled?