Scripting

  • 1.  Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 08:23
    Getting an error when creating the SO_SalesOrder_BUS object with an external script Error is J/C module not on file. I checked the SO_Options table and confirmed that integrate with J/C is turned off. I can create the SO Invoice with a script, but not sales orders. System is MAS 4.50 SQL. Suggestions?


  • 2.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 08:33
    I see a JC folder in MAS90 (folder). It has only four files in it.


  • 3.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 08:55
    That would be from a product update.


  • 4.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 08:57
    Is this a script you are creating or has it been in production? If in production, what's changed? Updates?


  • 5.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 09:05
    This was in production. Client moved SQL Server to a new server and changed the IP address of the MAS 200 Server. MAS 200 is working,. Can create sales orders in the UI, but not BOI. I have tested the script on my local install of 4.50 without a problem (though I have J/C installed). Can create GL entries through BOI and OIText.exe works. The scripts were created by Oz Development for importing tracking from UPS. They say it is a MAS issue and I have to agree with them. The script creates the SO_InvoiceTracking_bus object successfully prior to the attempt to create SO_Shipping_bus object. It dies with the error ""Module J/C is not on file.


  • 6.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 10:44
    I think I got around this by installing and activating Job Cost. I'm not proud, but I did it...


  • 7.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 10:48
    Here is a boiled down script that should create the sales order object: On Error Resume Next Dim strHomeDirectory strHomeDirectory = ""\\MASSERVER\Data\MAS 200 SQL\Version4\MAS90"" Set oScript = CreateObject (""ProvideX.Script"") oScript.Init(strHomeDirectory) Set oSS = oScript.NewObject(""SY_Session"") retVal = oSS.nSetUser(""Myron"", ""mypassword"") retVal = oSS.nLogon() retVal = oSS.nSetCompany(""NSI"") retVal = oSS.nSetDate(""S/O"",""20141113"") retVal = oSS.nSetModule(""S/O"") msgbox(""Set module retval = "" & retVal) retVal = oSS.nSetProgram(oSS.nLookupTask(""SO_SalesOrder_ui"")) MsgBox ""Before create Sales Order Object"" Set oSOOrder = oScript.NewObject(""SO_SalesOrder_bus"", oSS) MsgBox(oSS.sLastErrorMsg & "" End of Message"") Set oSOOrder = Nothing oSS.nCleanup() oSS.DropObject() Set oSS = Nothing MsgBox ""DONE


  • 8.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 10:49
    Purchase Job Cost? Ouch.


  • 9.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 11:12
    Actually, I'm not even sure if I had to activate it, but we definitely didn't purchase it. Not really apples-to-apples, but your script completes in my 4.50.0.4 PVX install (JC installed, not activated)


  • 10.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 11:59
    You can't buy JC for SQL.


  • 11.  RE: Getting an error when creating the SO_SalesOrder_B

    Posted 11-17-2014 12:11
    Ha, yeah, i guess that doesn't help then. Does that mean J/C is inadvertantly present in SY_Module?