Sage 100

 View Only
Expand all | Collapse all

Occasional Error 88 from Button Script

  • 1.  Occasional Error 88 from Button Script

    Posted 04-30-2026 13:13

    We have a many-user Sage 100 Premium 2025.1 customer that gets occasional Error 88 (invalid/unknown property name) from a Button Script execution in S/O Order Entry.

    They then return to the same order and don't get the error.

    Is this possibly affected by: 1)  many users at busy time of day?   2) an operator having multiple sales-order-screens open simultaneously?

    Lee



    ------------------------------
    Lee Graham
    Friendly Systems, Inc.
    ------------------------------


  • 2.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 14:12

    Is there a role permission check?  If you use the originally documented command for that, occasional error 88's do happen. (Alnoor can explain it better than I can).

    isMember = oSession.AsObject(oSession.Security).IsMember(RoleName)

    This (below) is the new command, which stops those errors

    retAllowed = oSession.IsMember(sRoleName)



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



  • 3.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 14:16

    No role permissions check in the script.  The script writes order info to another SQL database only if the ordertype = S., but we have even gotten this error on quotes, where it checks the ordertype and then skips right to an invoke button call at the end of the script...



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 4.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 14:21

    Does the button do things that cause other scripts to run?  There was an issue a couple years ago about error 88's with event scripts triggered by a button script... but that should be fixed in v2025.



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



  • 5.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 15:00

    @kevin - it does update the sales order lines (for orders, not quotes), and there are scripts on the SO_SalesOrderDetail but they should only be triggered on price/qty changes, which are not done by this script.  The really weird thing is most of the time users can close the error go back and click the button again and it works...



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 6.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 14:29

    Lee - Last week I responded to @Phil McIntosh about this. I'm assuming this is the same client for you guys. @Kevin Moyes and I mentioned there this could be another variation of the 64-bit script timeout issue but Phil mentioned this was a 32-bit system, so it wasn't that. I told Phil it could be something else and I would post a sample script soon to detect that. I will try to do so by this evening.

    You may remember that in pvx, every screen only gets a max 32MB of workspace memory despite the amount of system memory present. Sage object code does a good job of DROP OBJECT and other things for memory management / garbage collection so that number never gets close to 0. However, with mods and scripts, we have to do the same thing, otherwise at some point in the day, that S/O Entry screen that's been working fine will potentially crash in some way.

    ** So a PostRead script can be created to show the available workspace memory based on the pvx DSZ system variable and placed in a UDF. I'll post that sample soon. The point here is when they report the Error 88 now you can now check to see if they are out of memory. 



    ------------------------------
    Alnoor Cassim
    Accounting Systems, Inc. (ASI)
    ------------------------------



  • 7.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 14:51

    @Alnoor - Is it possible that users having multiple Sales Order Entry screens open at once could contribute, or does each screen each get a full 32mb?



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 8.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 15:08

    No each screen gets 32MB. OK here is how to figure out available workspace memory. Even if this is not the cause of the Error 88 at least this possibility will have been eliminated.

    'Get available workspace memory. 
    'Either create a new Customizer button with no desc OR create a numeric UDF
    'Create a PostRead script and attach this to it
    
    rV =oScript.DebugPrint("About to get DSZ")
    rV = oScript.Execute("tmpDSZ = DSZ")
    vbDSZ = oScript.Evaluate("tmpDSZ")
    vbDSZFormatted = FormatNumber(vbDSZ,0,,,-1)
    
    'Now either set the button text OR SetValue into the UDF
    'retVal = oBusObj.SetValue("UDF_DSZ", vbDSZ)
    
    'Change BT_LINK_3 to whatever it is for you
    oUIObj.SetControlProperty "BT_LINK_3", "Visible", 1
    oUIObj.SetControlProperty "BT_LINK_3", "Text$", "Mem=" & CStr(vbDSZFormatted)
    


    ------------------------------
    Alnoor Cassim
    Accounting Systems, Inc. (ASI)
    ------------------------------



  • 9.  RE: Occasional Error 88 from Button Script

    Posted 05-04-2026 14:34

    @Alnoor Cassim,  I put this on a Sales Order Header Post Read event and it gives an Error 88 Object required:  
    oUIObj, SY_MAINT.PVC 3480 in CallScript 



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 10.  RE: Occasional Error 88 from Button Script

    Posted 05-04-2026 14:59

    Place this snippet at the top and you should be good. This is needed for business scripts but not for UI scripts, and not for button scripts. I usually have a bit at the top of every script that checks to see if we're sitting in a UI to begin with and then does this bit:

    If IsObject(oUIObj) = False Then
       oUIObj = oScript.UIObj 'Updates will not have UIObj
      Set oUIObj = oSession.AsObject(oUIObj)
    End If



    ------------------------------
    Alnoor Cassim
    Accounting Systems, Inc. (ASI)
    ------------------------------



  • 11.  RE: Occasional Error 88 from Button Script

    Posted 05-04-2026 16:27

    Thanks!  That did it.  Any idea what number would indicate it's time to close the window and open another?



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 12.  RE: Occasional Error 88 from Button Script

    Posted 05-04-2026 16:53

    I would look for the number to fall below 1.5 MB (which is 1,500,000 as you would see it). You could even adjust the script to pop such a warning.



    ------------------------------
    Alnoor Cassim
    Accounting Systems, Inc. (ASI)
    ------------------------------



  • 13.  RE: Occasional Error 88 from Button Script

    Posted 16 days ago

    @Alnoor Cassim, it does not seem to be a memory issue - getting error 88 with 12,000,000 available.  Any other ideas on how to find the pattern?



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 14.  RE: Occasional Error 88 from Button Script

    Posted 23 days ago

    @Alnoor Cassim - Is there a way to have this script not fire if the call is from a BOI app?  We have an integration BOI app that started failing on Sales Order SetKey with this script in place, and runs normally again with it removed.



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 15.  RE: Occasional Error 88 from Button Script

    Posted 23 days ago

    This is from my notes... not sure where I found the reference:

     

    If oSession.ObjectInterface = 0 Then

        ' Launched from Sage 100 Desktop

    End If

     

    If oSession.ObjectInterface <> 0 Then

        ' Launched from COM object

    End If

     



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



  • 16.  RE: Occasional Error 88 from Button Script

    Posted 23 days ago

    @Kevin Moyes Thanks!  That fixed it!



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 17.  RE: Occasional Error 88 from Button Script

    Posted 04-30-2026 15:08

    One habit I have started (for button scripts especially) is to manually reset any object I created manually.  (Obviously don't do this for oBusObj...).



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



  • 18.  RE: Occasional Error 88 from Button Script

    Posted 05-04-2026 14:39

    this can be removed from urgent...



    ------------------------------
    Phil McIntosh
    Friendly Systems
    ------------------------------



  • 19.  RE: Occasional Error 88 from Button Script

    Posted 30 days ago

    @Robert Wood, please remove from Urgent.



    ------------------------------
    Brett Zimmerman
    Net at Work
    Greater Boston Area
    ------------------------------