CAD · Question #140
Which options are strategies for debugging client-side scripts? (Choose 2 answers)
The correct answer is A. g_form.addInfoMessage() C. jslog(). Client-side scripts in ServiceNow run in the browser and have access only to client-side APIs. g_form.addInfoMessage() (A) is a GlideForm method that displays a visible info banner on the form - useful for surfacing variable values during debugging. jslog() (C) is a ServiceNow cl
Question
Which options are strategies for debugging client-side scripts? (Choose 2 answers)
Options
- Ag_form.addInfoMessage()
- Bgs.addErrorMessage()
- Cjslog()
- Dgs.log()
How the community answered
(51 responses)- A92% (47)
- B6% (3)
- D2% (1)
Explanation
Client-side scripts in ServiceNow run in the browser and have access only to client-side APIs. g_form.addInfoMessage() (A) is a GlideForm method that displays a visible info banner on the form - useful for surfacing variable values during debugging. jslog() (C) is a ServiceNow client-side utility that writes output to the browser's JavaScript console. Both gs.addErrorMessage() (B) and gs.log() (D) are server-side GlideSystem methods and are not available in client-side scripts such as Client Scripts or UI Policies.
Topics
Community Discussion
No community discussion yet for this question.