ExamGecko
Question list
Search
Search

Question 45 - CAD discussion

Report
Export

Which of the following methods prints a message on a blue background to the top of the current form by default?

A.
g_form.addInfoMsg()
Answers
A.
g_form.addInfoMsg()
B.
g_form.addInfoMessage()
Answers
B.
g_form.addInfoMessage()
C.
g_form.showFieldMessage()
Answers
C.
g_form.showFieldMessage()
D.
g_form.showFieldMsg()
Answers
D.
g_form.showFieldMsg()
Suggested answer: B

Explanation:

From: https://docs.servicenow.com/bundle/paris-application-development/page/script/general-scripting/reference/r_ScriptingAlertInfoAndErrorMsgs.html

g_form.showFieldMsg('field_name', 'Hello World', 'error'); Puts 'Hello World' in an error message **below the specified field**. g_form.addInfoMessage() or g_form.addErrorMessage() place a blue box message at the top of the screen. Pg 126 of the CAD handbook

The method that prints a message on a blue background to the top of the current form by default is g_form.addInfoMessage(). The g_form object is a global object that provides access to form fields and UI elements on a form. The addInfoMessage() method is a method of the g_form object that displays an informational message next to the form header. The message has a blue background color by default, unless it is overridden by a CSS style. The addInfoMessage() method takes one argument, which is the message text to display. References: [ServiceNow Docs - GlideForm (g_form) API], [ServiceNow Docs - g_form.addInfoMessage()]

asked 23/09/2024
Ragul Ponniah
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first