Scripting

  • 1.  Need ideas why a NewObject method starts failing in a proven script

    Posted 02-21-2024 16:30
    Edited by Dan Burleson 02-21-2024 16:36

    I'm getting an error 428 "Object doesn't support this property or method" in the Set command below within a BOI script inside Microsoft Access. This is 2020 Advanced and I've re-run Workstation Setup. I'm about to try MAS90 mode as that's how BOI scripts run. "Allow External Access" is enabled in Company Maintenance. The Sage user has full rights. The BOI login is successful as is the nSetProgram command below. The only thing changed is the user's workstation. I also tried disabling virus protection and double-checked that there are full rights to the MAS90 folder.

    r = oSession.nSetProgram(oSession.nLookupTask("SO_SalesOrder_ui"))
    Set oBusObj = oScript.NewObject("SO_SalesOrder_bus", oSession)



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-224-6642
    ------------------------------



  • 2.  RE: Need ideas why a NewObject method starts failing in a proven script

    Posted 02-21-2024 16:53

    MAS90 Mode gets "Unlock Region Error", second attempt got in to Sage 100, but accessing Sales Order gives errors then more "Unlock Region Error"'s.



    ------------------------------
    Dan Burleson
    Software Consultant
    Connex Software
    Corvallis OR
    541-224-6642
    ------------------------------



  • 3.  RE: Need ideas why a NewObject method starts failing in a proven script

    Posted 02-22-2024 08:12

    Is the oScript.Init path correct on that workstation?

    My other dumb thought is that "oBusObj" is somehow conflicting/corrupted with another object, though I don't know how or why that would be workstation-specific. Do you get the same errors if you rename oBusObj to oSO. I have no justification for this, just grasping at straws....

    My normal initialization routine is this:

    'Create ProvideX COM Object and Session

    oScript = 0        ' MAS Primary Object #1
    oSession = 0        ' MAS Primary Object #2
    Set oScript = CreateObject ("ProvideX.Script")
    oScript.Init(strPathRoot & "\Home")
    Set oSession = oScript.NewObject("SY_Session")



    ------------------------------
    Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
    ------------------------------



  • 4.  RE: Need ideas why a NewObject method starts failing in a proven script

    Posted 02-22-2024 17:27
    Thanks Steve for the ini suggestion I will look at that. We've re-setup the prior workstation that still works. Other suggestions are welcome! 



    Sent from my Galaxy





  • 5.  RE: Need ideas why a NewObject method starts failing in a proven script

    Posted 02-22-2024 17:59

    https://us-kb.sage.com/portal/app/portlets/results/viewsolution.jsp?solutionid=223924250030437&page=1&position=1 



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------