CAD practice question 22 of 35
In a privately-scoped application, which methods are used for logging messages in server-side scripts? (Choose 2 answers)
Full set: 264 questionsPrivately-scoped applications may log to the system log only with the GlideSystem (gs) methods that remain exposed in the scoped API. The scoped GlideSystem API list includes gs.info() and gs.error(), which write informational and error-level entries to the System Log. Methods such as log(), logError(), and debug() are deliberately removed or blocked to prevent excessive or insecure logging from a scoped app. Therefore, gs.info() and gs.error() are the two valid server-side logging functions for privately-scoped applications.
B. gs.debug() – The debug() method is not part of the scoped GlideSystem API; calls from a privately-scoped app are disallowed.
C. gs.iog() – No such GlideSystem method exists.
E. gs.logError() – logError() is excluded from the scoped API; attempting to use it in a private scope throws a script error.
1. ServiceNow Developer Site – GlideSystem (Scoped) API, “Method Summary” (Utah release): lists error() and info(); debug(), log(), logError() are absent.
2. ServiceNow Product Documentation – “Restricted server-side APIs in scoped applications” (Now Platform Scripting Guide, Utah), Table: “GlideSystem methods not available to scoped apps” – includes debug(), log(), logError().
(Exact URLs vary by release; navigate via Developer Site > API Reference > Server APIs > GlideSystem – Scoped.)
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 1Which options are strategies for debugging client-side scripts? Choose 2 answers
- 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?
