So I'm working on NAV 2017, using advanced warehouse functionality:
- I create a sales order and add an item line quantity: 4
- I create a warehouse shipment for this sales order
- I create a warehouse pick and do a partial pick, so I put Qty. to Handle: 1 and register my pick
- Now when I try to register send only my Warehouse Shipment, I get this error:
"An attempt was made to change an old version of a “Sales Line” record"
Debug and see that standard code is throwing this. The call stack is basically:
CU 80 Post calls FinalizePosting -> PostUpdateOrderLine(SalesHeader); -> ModifyTempLine(TempSalesLine);
The code in ModifyTempLine is standard:
TempSalesLineLocal.MODIFY;
SalesLine := TempSalesLineLocal;
SalesLine.MODIFY; //This Line throws error
I modified this function to see if any customizations (which I'm almost sure, I don't have in this part) could be the problem, but I still get the error:
COMMIT;
TempSalesLineLocal.MODIFY;
SalesLine.GET(TempSalesLineLocal."Document Type",TempSalesLineLocal."Document No.",TempSalesLineLocal."Line No.");
SalesLine := TempSalesLineLocal;
SalesLine.MODIFY; //Still throws the error