We are experiencing a strange error when attempting to call the updateReservation() method of an InventMovement object. If the item that is in the InventMovement object has an OnOrder quantity in the InventSum table, we receive the following error:
Cannot edit a record in Order Lines (SalesLine). Cannot call NEXT, update() or delete() on buffer where data is selected or inserted in another transaction scope.
It turns out that the InventUpd_Reservation.updateNow() method is not called unless the item is OnOrder. However, after checking the calling class, which is a custom class I created, I do not see anywhere else that we access that SalesLine in any transaction scope. The InventMov_Sales object is not created until right before we call the updateReservation() method and the InventUpd_Reservation object is passed the existing InventMov_Sales object via the InventUpd_Reservation::newMovement() static method. I thought perhaps that InventUpd_Reservation was creating a new InventMovement object, thus causing the error, but it doesn't--it uses the same one.
Does anyone have any idea why this might be happening?
Brandt
*This post is locked for comments