CAD practice question 1 of 35
Which options are strategies for debugging client-side scripts? Choose 2 answers
Full set: 264 questionsClient-side scripts execute in the browser, so debugging must use APIs that run on the client.
• gform.addInfoMessage() inserts an informational banner at the top of the form, allowing a script writer to surface variable values or execution points directly to the user interface.
• jslog() writes messages to the JavaScript Log window (opened from Application Navigator → System Diagnostics → JavaScript Log), giving real-time diagnostic output while the script runs in the browser. Both functions are explicitly documented for client-side troubleshooting and do not require a round-trip to the server.
A. gs.addErrorMessage() – GlideSystem API; executes only in server-side scripts (Business Rules, Script Includes), unavailable in the browser.
C. gs.log() – Another GlideSystem (server-side) logging method; cannot be called from Client Scripts or UI Policies.
1. ServiceNow Developer Site, “gform.addInfoMessage(message)” – Client-side API description and example (Utah release), Section: gform API, paragraph 1.
2. ServiceNow Product Documentation, “JavaScript Log” – Debugging client-side code; states “Use jslog() to output messages to this log.” (Rome release)
3. ServiceNow Docs, “Debugging client scripts” – Notes that gs. methods are server-side only, unsuitable for client debugging (Paris release, para. 2).
Keep practicing
Take the free CAD practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CAD practice questions
- Question 2Which of the following is a good practice for adding instructions to a form?
- Question 3Identify characteristic(s) of a Record Producer. Choose 3 answers
- Question 4Exportitem table is extended from Item table with the additional column of ItemCountry ad…
- Question 5Which one of the following is the fastest way to create and configure a Record Producer?
- Question 6On what part of the ServiceNow instance, would you find the option to Impersonate User?
- Question 7What field type would you select if you want to query records from another table on a for…
