Oh please tell me where I've gone wrong. I'm trying to get a simple message to pop up in SO entry. This is on version 2021 Premium. Below is my script. I've also tried retVal = oScript.SetWarning. Please see the attached image which shows that the script is running - it's just the message that won't pop. I have this script set at Column Post-Validate on the UDF_STATE field on the SO_SalesOrderHeader.
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
------------------------------
Jane Scanlan
Partner
Next Level Manufacturing Consulting Group
------------------------------