Get NewObject Error 65 When Creating Sales Order object

SOLVED

On my development machine I am getting the error code "NewObject Error: 65" when trying to create a sales order object. Our MAS 200 installation is on an internal server local to our office but not on my machine. I am developing in C# but have created a VB class library to hold the VB code and added a reference to the class in my project.

Public Sub CreateSOConnection()
        Try
            ' Create and Init ProvideX.Script Object
            oPVX = CreateObject("ProvideX.Script")
            oPVX.Init("M:\Best\Mas 200\Version4\Mas90\Home")

            ' Create and Initialize Session Object
            oSS = oPVX.NewObject("SY_Session")
            oSS.nSetUser("abc", "abc123456")
            oSS.nSetCompany("TST")
            oSS.nSetDate("S/O", "20100531")
            oSS.nSetModule("S/O")

            ' Create Sales Order Business Object
            oSS.nSetProgram(oSS.nLookupTask("SO_SalesOrder_ui"))
            soORDER = oPVX.NewObject("SO_SalesOrder_bus", oSS) <== Fails Here

            ' Create Customer Business object
            oSS.nSetProgram(oSS.nLookupTask("AR_Customer_ui"))
            arCUST = oPVX.NewObject("AR_Customer_bus", oSS)

            MsgBox("Good")

        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub

Parents
  • 0

    Greetings,

    D you know if any of the method calls to SY_Session failed (SetUser, SetCompany,etc.)?  You should specify a return value and check to see if any of them fail what the error message returns.  Also, make sure the user you are specifying has rights to Sales Order.

    Thanks,

    Kent

Reply
  • 0

    Greetings,

    D you know if any of the method calls to SY_Session failed (SetUser, SetCompany,etc.)?  You should specify a return value and check to see if any of them fail what the error message returns.  Also, make sure the user you are specifying has rights to Sales Order.

    Thanks,

    Kent

Children