What It Does

The addInfoMessage() method immediately displays a blue informational message at the top of the current form. The message appears in a dismissible notification box with an 'i' icon and remains visible until the user clicks the X button or navigates away from the page.

ServiceNow renders the message by injecting HTML into the form's notification area at the DOM level. The platform automatically escapes HTML content, so raw HTML tags will display as text rather than being interpreted. The message styling follows the standard ServiceNow UI notification patterns with blue background coloring to indicate informational content.

The method returns void and has no failure states - it will always attempt to display the message regardless of the parameter content. Even empty strings or null values result in a visible message box, though it will appear blank.

Multiple calls to addInfoMessage() result in multiple message boxes stacking vertically. The platform doesn't deduplicate identical messages or prevent rapid-fire calls from creating dozens of notifications. Each message operates independently with its own dismiss button.

The method is part of the GlideForm family alongside addErrorMessage() and addWarningMessage(). Unlike showFieldMsg(), info messages are not tied to specific fields and appear in the general form notification area.

When to Use This

Use addInfoMessage() for non-critical information that enhances the user experience without blocking workflow. Common scenarios include confirmation messages after successful operations, helpful context about form behavior, or status updates that don't require immediate action. The blue styling signals optional information rather than urgent warnings or errors.

For validation errors or critical warnings, use addErrorMessage() or addWarningMessage() instead. When providing field-specific feedback, showFieldMsg() creates a better user experience by positioning the message directly adjacent to the relevant field.

Avoid using info messages for routine form validation or as primary error handling. Users often dismiss informational messages quickly, making them unsuitable for critical information. Don't use info messages to communicate required actions or validation failures that should prevent form submission.

Return Value

The method returns void (undefined in JavaScript). No return value is provided because the operation either succeeds in displaying the message or fails silently without throwing exceptions. The platform provides no feedback mechanism to confirm whether the message was successfully rendered.

Since there's no return value to check, handle message display as a fire-and-forget operation. Don't attempt to chain operations or make decisions based on the success of addInfoMessage() calls.

Free Newsletter

Enjoying this? Get one deep-dive per week.

Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.

No spam · Unsubscribe anytime

Platform Behavior & Side Effects

  • No server-side Business Rules, workflows, or notifications are triggered - this is purely a client-side UI operation
  • Nothing is written to the database or audit logs - info messages exist only in the browser session
  • Performance impact is minimal - DOM manipulation occurs locally without server round trips
  • Messages persist across field changes and client script executions but disappear on page refresh or navigation
  • Multiple messages stack vertically with independent dismiss controls - no automatic deduplication occurs
  • Works consistently across all client script types (onChange, onLoad, onSubmit) and UI Policies
  • Message rendering follows standard ServiceNow accessibility patterns and screen reader compatibility