Hi,
--Using NAV 4.0 SP2--
My issue is that I am not allowed to delete a sales order because a sales line on the order is referring to a purchase order.
Steps to reproduce:
1. Create a sales order
2. Add an item to a sales line
3. Create a purchase order
b. refer the purchase order to the sales line just created
4. Try to delete the sales order. You will get a message saying:
You cannot delete the order line because it is associated with purchase order %1 line %2.
5. Next thing I do is to delete the purchase order. This goes well
6. Then I try to delete the sales order again, but still get the same message
7. I go into the Object designer and run the Sales Line table and see that there is still a reference to the purchase order that no longer exist. From here, I am not allowed to delete the reference either
Does anyone have any tips for how I can delete the sales order?
I have been looking for a concatenation table between the sales line and purchase order table, but cannot seem to find it.
Any help appreciated!
0
Comments
if you click on a slaes line & ZOOM you will see the PO# & PO line No filled.
You need to clear those fields (if they are not editable, make them) then you can delete.
http://www.BiloBeauty.com
http://www.autismspeaks.org
Instead of making the fields editable (I don't like changing field definitions back and forth), just write a report / codeunit, set your filters, assign values to the fields, and modify the records. Works like a charm every time.
My Blog - nav.education
Example/
OnPush()
ClearSalesLinePO()
ClearPurchaseLineSO()
I'm clearing the SPECIAL order purchase no - but assign the field that you are filling if it's different.
NOTE this is good for completely clearing ALL links not just 1 line
http://www.BiloBeauty.com
http://www.autismspeaks.org
I'll give this a try and revert with the results