In Sage 100 2023, why does the HandleScriptUI method now get Error #88 after InvokeButton?

To reproduce, in either 32-Bit or 64-Bit Sage 100, create an "Execute Script on Server" button in either Customer Maintenance or Item Maintenance (maybe any panel) that runs a simple two line script:

retVal = oScript.InvokeButton("BT_LINK_2")
retVal = oUIObj.HandleScriptUI() 

Where the target button (BT_LINK_2) runs another script with any valid statement (MsgBox "Hello World" 'works) and the result will be an Error #88 and the MsgBox is not invoked. This worked in 2022 and 2021

  • 0

    I sure would like to know the answer to why this started failing in 2023! Note that either of the two lines above cause an error by themselves, but in the order shown they cause the Error #88. It doesn't matter whether the invoked button is "run on server" or "run on client". Obviously, the initial button is "run on server" since it has boi methods.

  • 0

    We are seeing similar behavior on any subsequent script execution that is triggered from a button script in 2023.

    One of our largest clients is attempting to migrate to Sage 100 2023 Premium with SQL 2019 and Windows 2022 servers.

    As a simple example, we have a button script on the Purchase Order Entry panel that runs a server side script to create a somewhat matching Sales Order using the SO_SalesOrder_bus object. 

    If there are no business object scripts on the Sales Order Detail table, the new sales order gets created fine; however, there are several scripts that need run on this table during pre and post validate events of several fields on the Sales Order detail object.  We've stripped all of them down to one simple Post Validate script that runs on the ItemCode that simply sets one field value via oBusObj.SetValue.

    When creating a sales order natively in the sales order entry screen, that script runs fine.  If we trigger the PO button script to create a sales order via the SO_SalesOrder_bus object, it throws an Error 88 in SY_Maint at line 3556 when the ItemCode Post-validate event is triggered from the newly created sales order object in the button script.

    We've traced the issue to the InitScriptEngine method when attempting to set the AllowUI property on the coScriptHandleVB object.  This property is a standard property for the MSScriptControl.ScriptControl system object from Windows, but for some reason is not a valid property on the proxy pvx object in memory when the InitScriptEngine method is called within SY_Maint (specifically line 3556)

    This is a serious technical problem as the majority of our clients have multiple pre and post script events in place all of which fail if an entry is being created from a secondary screen via a button script.

  • 0 in reply to TPeterson

    Hello, we will have a hot-fix available for this issue in January and include the fix in the April 2023 PU. 

  • 0 in reply to jcnichols

    Thanks.  Let me know if an advanced copy could be made available.

  • 0 in reply to jcnichols

    That's great news!!!

  • 0

    The hot fix for the error 88 will be available next week (Jan 8 - Jan 12) provided it passes QA.

    LM7204T - 32 bit Sage 100
    LM7205T - 64 bit Sage 100

    John Nichols
    Sage