CAD · Question #180
Which of the following is true about g_scratchpad? Choose 2 answers
The correct answer is C. Used to push information from the server to the client D. Has constructors and methods. The g_scratchpad object is a server-to-client data transfer mechanism primarily used to pass non-database information from a server-side Business Rule to a client-side script, and it supports methods.
Question
Which of the following is true about g_scratchpad? Choose 2 answers
Options
- AHas default properties passed by client-side scripts
- BDoes not exist on the mobile platform
- CUsed to push information from the server to the client
- DHas constructors and methods
How the community answered
(24 responses)- A4% (1)
- B8% (2)
- C88% (21)
Why each option
The g_scratchpad object is a server-to-client data transfer mechanism primarily used to pass non-database information from a server-side Business Rule to a client-side script, and it supports methods.
g_scratchpad is populated by server-side scripts (e.g., Business Rules) to pass information to client-side scripts; it does not have default properties passed *by* client-side scripts.
g_scratchpad is generally available on both the desktop and mobile platforms as it is a fundamental mechanism for passing server-side data to client-side forms.
g_scratchpad is specifically designed for Business Rules to store data on the server and then pass it to client-side scripts (e.g., Client Scripts) during form loading, effectively pushing information from the server to the client.
g_scratchpad is a JavaScript object and can indeed have methods added to it, enabling more complex data structures and functionality, such as g_scratchpad.addInfoMessage().
Concept tested: g_scratchpad usage and characteristics
Source: https://docs.servicenow.com/bundle/utah-application-development/page/app-store/dev_portal/API_reference/g_scratchpad/concept/g_scratchpad_GS.html
Topics
Community Discussion
No community discussion yet for this question.