CSA · Question #403
What is the primary objective of the Display Business Rule?
The correct answer is B. To use a shared g_scratchpad object, which can be sent to the client, as part of the form. The primary objective of a Display Business Rule is to prepare server-side data and make it available to client-side scripts through the g_scratchpad object when a form loads.
Question
What is the primary objective of the Display Business Rule?
Options
- ATo monitor fields on a form, and provide feedback
- BTo use a shared g_scratchpad object, which can be sent to the client, as part of the form
- CTo set files to mandatory, hidden, and read-only
- DTo define what happens on a form, when a particular fled changes
How the community answered
(56 responses)- A2% (1)
- B95% (53)
- D4% (2)
Why each option
The primary objective of a Display Business Rule is to prepare server-side data and make it available to client-side scripts through the `g_scratchpad` object when a form loads.
Monitoring fields and providing feedback on a form is primarily the function of client-side scripts, such as onChange Client Scripts.
Display Business Rules execute on the server just before a record is displayed on a form, allowing them to query the database or perform other server-side operations and then populate the `g_scratchpad` object, which is sent to the client and accessible by client-side scripts.
Setting fields as mandatory, hidden, or read-only is typically handled by UI Policies or Client Scripts, not Display Business Rules.
Defining actions based on field changes on a form is a primary use case for onChange Client Scripts.
Concept tested: Display Business Rule function; g_scratchpad
Source: https://docs.servicenow.com/bundle/utah-application-development/page/script/business-rules/concept/c_BusinessRules.html#display-business-rules
Topics
Community Discussion
No community discussion yet for this question.