Scoped GlideSystem - addInfoMessage(Object message)

Adds an info message for the current session. This method is not supported for asynchronous business rules.

Table 1. Parameters
Name Type Description
message Object An info message object.
Table 2. Returns
Type Description
void
if ((!current.u_date1.nil()) && (!current.u_date2.nil())) {
  var start = current.u_date1.getGlideObject().getNumericValue();
  var end = current.u_date2.getGlideObject().getNumericValue();
  if (start > end) {
    gs.addInfoMessage('start must be before end');
    current.u_date1.setError('start must be before end');
    current.setAbortAction(true);
  }
}

Output: