BM ProductionRegister - New object error:200

SUGGESTED

Hi,
i've been constantly getting the error "System.Exception: <NewObject Error: 200>" when I register the BM production entries.

here's what I have coded:

                    oSS2.nSetProgram(oSS2.nLookupTask("BM_ProductionRegister_UI"))
                    objTransactionRegister = oScript2.NewObject("BM_ProductionRegister_UPD", oSS2)
                    oSS2.nTerminateUI()
                    If blnUseBatch = True Then
                      retVal = objTransactionRegister.nSelectBatch(strBatchNo)
                    End If
                    retVal = objTransactionRegister.nUpdateInit()
                    retVal = objTransactionRegister.nUpdateMain()
                    retVal = objTransactionRegister.nUpdateCleanup()

                    'drop the Transaction Register
                    objTransactionRegister.DropObject()
                    'drop the session
                    oSS2.DropObject()

Any help/clarification on what I might be doing wrong to register the BM transaction would be greatly appreciated.

Thanks!

Parents
  • 0

    I believe you need a Set at the beginning of line two in your post since you are getting a object handle from the NewObject method. However, you may want to instead consider using the oNewObject or oGetObject methods of your oSS2 object so you can reference its sLastErrorMsg in the event the object could not be created.

Reply
  • 0

    I believe you need a Set at the beginning of line two in your post since you are getting a object handle from the NewObject method. However, you may want to instead consider using the oNewObject or oGetObject methods of your oSS2 object so you can reference its sLastErrorMsg in the event the object could not be created.

Children