Using subcontracting in Dynimics is a little bit harsh. My case is: Subcontracting work > Creating a production order > Estimate the production order > Scheduling the production order > Confirming the purchase order of the subcontracting work > after that resetting the status of the production order from Scheduled to Created. The outcome should be: purchase order header(PurchTable) and also lines(PurchLines) should come with PurchStatus=Canceled & LineStatus=Canceled. What happens in the system as it is: Resetting the status of a production order already scheduled with the purchase order in status confirmed, sets the Purchase order status in Canceled but the Line status of the purchase order in status Open order. This line/s can only be seen as incorrect data in PurchLine Table. The line/s have 0 qty but have a status Open ordered when it should be Canceled as a Lines status.