Scripting

Expand all | Collapse all

hi there,Working with BOI over here and trying t

  • 1.  hi there,Working with BOI over here and trying t

    Posted 10-08-2018 13:12
      |   view attached
    hi there, Working with BOI over here and trying to troubleshoot a what I think is a network issue. The lay of the land is I have a Sage 100 server (sc-as02 Server) and I have another server( sc-as01 Server) that has workstation setup components on it - i'll call that one the workstation. I can connect to the data and update customers from either the server or the workstation via the Standard Sage 100 screens. No errors. Next I put a BOI script on the 100 server (sc-as02) to insert a test customer. The script is attached. It is very basic - just inserts the customer number, name and salesperson. When I run the script on the 100 server(sc-as02) , it inserts the customer as expected and when I look in the standard 100 screen I can see my new customer. Yay - so far at least. Now I go over to the workstation (sc-as01) and try to run the BOI script that resides on the Sage 100 Server - wont insert the new record. I copied the BOI script down to the workstation (sc-as01) and tried running that one - still no joy. I tried changing the path to the workstation 'home' directory as well as the server directory but always get errors from the workstation side. I tried launching cmd as admin and running via command prompt still doesnt insert the record. So my question is can you invoke BOI scripts across a network? Should the BOI script reside on server or on each workstation that will run it? if it is on the workstation, when running a BOI script, the oScript.Init() data - should this be pointed to the server that has the 100 server components on it or the local workstation install directory? i have tried it both ways on the workstation and neither work - nor does copying the script to the workstation and updating the paths here. Since this is on a secure network could it be that some network security is blocking network wide scripts or launching of scripts across the network? Firewall or antivirus?

    Attachment(s)



  • 2.  RE: hi there,Working with BOI over here and trying t

    Posted 10-08-2018 13:16
    Do you get any sort of error when you run it on the workstation? Also, do they have DSD's SQL Mirroring installed?


  • 3.  RE: hi there,Working with BOI over here and trying t

    Posted 10-08-2018 13:21
    BOI should fine across a network and it can reside anywhere (though I usually dump it under MAS90\CM\Scripts). What edition? Is Allow External Access checked? Are you running with the same Windows permissions on the server vs the workstation? You say it's a secure network, so are they blocking File Services (or equivalent) traffic?


  • 4.  RE: hi there,Working with BOI over here and trying t

    Posted 10-08-2018 13:25
    Is the windows script host returning any errors? particularly around the line `Set oScript = CreateObject(""ProvideX.Script"")`? i always point my script to MAS90\Home directory on the server. The script can reside anywhere the pvxcom.exe has been registered. If on x64, Any chance the script is being executed by the x64 version of cscript.exe or wscript.exe? Try creating a shortcut to the x32 version of wscript.exe with the path to your script as the first argument. Example, `C:\Windows\SysWOW64\wscript.exe ""E:\TSS\Misc Scripts\TestCR.vbs""`.


  • 5.  RE: hi there,Working with BOI over here and trying t

    Posted 10-08-2018 14:10
    Your script works for me on a workstation using a 32-bit script environment. No admin mode necessary. 'Can reside on workstation. It should point to the server installation. What @DavidSpeckII said.


  • 6.  RE: hi there,Working with BOI over here and trying t

    Posted 10-09-2018 12:57
      |   view attached
    Hi all - Thank you all for the feedback and assistance. On the workstation I do receive an error message and its related to line 28 of the script which is the line reading: Set oARCustomerEntry = oScript.NewObject(""ar_customer_BUS"", oSS) (I attached a screen shot of the error message) the error is <NewObject Error: 200> I have 'Allow External Access' checked for this company. On the workstation, I tried @DavidSpeckII recomendation of the shortcut to the 32version of wscript. I get the same above mentioned error. So it ~seems~ there is an issue with the AR_Customer_Bus object. The standard screens in a/r module work fine I dont get errors when logged into Sage 100 on the workstation at all. Does that lead us to the firewall settings as being the most likely??


  • 7.  RE: hi there,Working with BOI over here and trying t

    Posted 10-09-2018 13:14
    Error 200 would indicate it could not create the object for the class specified. Check this thread. https://sagecity.na.sage.com/support_communities/sage100_erp/f/sage-100-business-object-interface/41608/new-object-error-200 Also, throw in an `on error resume next` before that line and a `Msgbox(""Error occurred getting New Object for AR_Customer_Bus: "" & oSS.sLastErrorMsg)` after the line. The LastErrorMsg may indicate exactly why the session object was unable to create the object.


  • 8.  RE: hi there,Working with BOI over here and trying t

    Posted 10-10-2018 07:07
      |   view attached
    Hi @DavidSpeckII the error code is 100006 when adding the error resume next then the slasterrormsg as you mentioned to try. I didn't get any hits on google when searching error code 100006 and vbs - is that a generic error code?


  • 9.  RE: hi there,Working with BOI over here and trying t

    Posted 10-10-2018 07:12
    Strange, that ""100006"" is coming from oSS.sLastErrorMsg?


  • 10.  RE: hi there,Working with BOI over here and trying t

    Posted 10-10-2018 07:20
    Can you try another object, like using IM_Item_UI in the SetProgram and CI_ItemCode_Bus in the NewObject?


  • 11.  RE: hi there,Working with BOI over here and trying t

    Posted 10-10-2018 07:21
    Oh wait - the 100006 is NOT from the oss.sLastErrorMsg.


  • 12.  RE: hi there,Working with BOI over here and trying t

    Posted 10-11-2018 09:10
    hi all thank you for your help with this. The solution was - Avatax DLL's were not registered on the 'workstation' server. Once this was done things started to work properly!


  • 13.  RE: hi there,Working with BOI over here and trying t

    Posted 10-11-2018 09:27
    Glad you got it figured out. Did the oSS.sLastErrorMsg point you in the right direction or was it the sagacity post that mentioned needing additional DLLs copied to the worksstation?