CSA practice question 15 of 35

UI Action can prompt that an Incident has been successfully submitted.

Full set: 500 questions
Answer options
A: True
B: False
Correct Answer:
TRUE
Explanation

A UI Action is a scriptable button, link, or context menu item that can execute code on either the client-side, the server-side, or both. A common use case for a server-side script within a UI Action is to perform a database operation (like inserting or updating a record) and then provide feedback to the user. This feedback is typically accomplished by calling the gs.addInfoMessage() method, which displays a blue informational message at the top of the page, confirming the successful submission or update.

Why Incorrect

The statement is not false because providing user feedback is a fundamental capability of UI Actions. The ServiceNow platform provides specific API methods, such as gs.addInfoMessage(), intended for this exact purpose within server-side scripts, which are a core component of UI Actions. Denying this capability would misrepresent the function and purpose of UI Actions.

References

1. ServiceNow Product Documentation, "UI actions": In the section titled "UI action scripts," the documentation states, "Server-side scripts can do things like change database values... After the script runs, the system returns the user to a page." It also provides examples that use the GlideSystem (gs) API to interact with the user, which includes adding messages.

2. ServiceNow Developer API Reference, "GlideSystem - Scoped, Global": The documentation for the addInfoMessage(Object message) method explicitly states its purpose: "Adds an informational message to be displayed at the top of the page." This method is frequently used within the server-side script field of a UI Action to confirm a successful operation.

3. ServiceNow Fundamentals (On-Demand Courseware): In the "Server-Side Scripting" module, the course demonstrates how to create UI Actions. The labs and examples explicitly show the use of current.update(); followed by gs.addInfoMessage("Record has been updated."); as a standard pattern to save a record and notify the user of the success.

Scroll to Top