I have the following script that pops up a message in Company Code HMC for users other than TAG when a certain UD is populated. Works fine....
Set oUI = oSession.AsObject(oSession.UI)
TRANS = ""
USER = ""
COMPANYCODE = ""
retVal = oBusObj.GetValue("UDF_TRANSMITTED_TO_WAREHOUSE$", TRANS)
USER = oSession.UserCode
COMPANYCODE = oSession.CompanyCode
If COMPANYCODE = "HMC" THEN
If TRANS= "Y" THEN
sMsg = "WARNING: CANNOT CHANGE! This line has already been transmitted."
retVal = oScript.SetError(sMsg)
End If
End If
End If