Sage 100

 View Only
  • 1.  Getting Entry vs Inquiry in client side button script

    Posted 05-05-2026 15:30

    Since oBusObj doesn't work in client-side scripts, how can I retrieve whether the button has been clicked in Item Entry or Item Inquiry?



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


  • 2.  RE: Getting Entry vs Inquiry in client side button script

    Posted 30 days ago

    I'd also like to know this. Or does anyone know how we can get to ProvideX PRGNAME under Execute by Client?



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



  • 3.  RE: Getting Entry vs Inquiry in client side button script

    Posted 30 days ago
    Edited by Alnoor Cassim 30 days ago

    Here is a long-winded way. Not tested. Imperfect. I'll use S/O Entry vs S/O Inquiry to describe but same concept for Item Maint vs Item Inquiry too. I'll assume your button becomes available to click once a record is selected.

    • Create a 30-digit string UDF called Temp and place in SO Entry/Inquiry screen with Customizer
    • Create a regular business PostRead event script. It would look something like this:

      If IsObject(oUIObj) = False Then
      	oUIObj		= oScript.UIObj
      	Set oUIObj	= oSession.AsObject(oUIObj)
      End If
      
      'Use InvokeChange instead of SetValue since we could be on the Inquiry screen
      'Alternatively use SetVar
      rV = oUIObj.InvokeChange("UDF_TEMP", oSession.StartProgram)
      
    • In Customizer, on your client side button script properties, click on Link Settings then on "Select variables to be passed into script". Add UDF_TEMP$ from that list.
    • In your button script, you would add something like this: 

      sMsg = "Start Program: " & SO_SalesOrder_bus_Temp
      MsgBox sMsg
    • You can use InStr or InStrRev to figure out if "INQUIRY" is found in SO_SalesOrder_bus_Temp to know you're on an Inquiry screen.
    • Unfortunately you may get prompted to save the record if you use the arrow keys in top to browse to next record or prev record.



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