Skip to Content
Jan 13, 2015 at 07:14 AM

Close Production Order impossible with DI API on 9.1



Since I upgrade my customer from B1 9.0 to 9.1 Patch 4,I can't close ProductionOrder witch have transaction

My code is :

Dim OrdreFabrication As ProductionOrders = DirectCast(oCompany.GetBusinessObject(BoObjectTypes.oProductionOrders), ProductionOrders)
If OrdreFabrication.GetByKey(Docentry) Then
     If OrdreFabrication.ProductionOrderStatus = BoProductionOrderStatusEnum.boposReleased Then
          OrdreFabrication.ProductionOrderStatus = BoProductionOrderStatusEnum.boposClosed
           If OrdreFabrication.Update <> 0 Then
                SBO_Application.StatusBar.SetText(String.Format("ERROR : {0}", oCompany.GetLastErrorDescription), BoMessageTime.bmt_Short, BoStatusBarMesspe.smt_Error)
          End If
      End If
End if

I have this error message : Action is valid for planned or released production orders with no transactions [WOR1.PlannedQty][line: 1] , 'Row no. 1'

Is it a bug or a new process exist to close a productionorder with transaction,(this object has no method "close" only (add, update and Cancel method)

Best regards