addErrorMessage()

addErrorMessage of the GlideSystem class can be used to add an error message to the current interactive user session. These session error messages are shown to end users at the top of the form and above any addInfoMessage entries.

Usage:

gs.addErrorMessage(Object message); 

Example:

gs.addErrorMessage("Incident record successfully updated."); 

Get ServiceNow Application Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.