Script message won't display

SUGGESTED

Can't determine what the problem is for the script message not displaying in SO Entry.   Here is my script.  Client is Premium version 2021

' -------------------------SCRIPT START ------------------------------------
If oSession.CompanyCode <> "ZZZ" and oSession.CompanyCode <> "ZJS" and oSession.CompanyCode <> "XXX" Then
Exit Sub
End If

retVal = oScript.DebugPrint("California DOT Script is running.")

sDOT = "" : sState = ""

retVal = oBusObj.GetValue("UDF_DOT$", sDOT)
retVal = oScript.DebugPrint("DOT = " & sDOT)
retVal = oBusObj.GetValue("UDF_STATE$", sState)
retVal = oScript.DebugPrint("State = " & sState)

if sDOT = "Y" and sState = "CA" then
retVal = oScript.SetError("Do NOT quote BNX! Instead quote Griptwist Male plus TDX.")

End If

When I have the trace window open it shows that the script is running but it won't pop the message.

Parents Reply
  • 0 in reply to JPSinMN
    SUGGESTED

    You should not use the VBScript msgbox command, as it will pop-up where the script is running on the server.  However, if you use the Sage MessageBox() method, it will route the message to the workstation.

    oSession.AsObject(oSession.UI).MessageBox "", "Hello World!"

    But, you should check for the the UI being present (oSession.UI) having a value before you attempt to display the message.  This message will have an OK button on it.

Children