nerdexam
ServiceNow

CIS-ITSM · Question #16

Which of the following catalog client script methods will modify the choice list options available to an end user on a catalog item?

The correct answer is B. onLoad. The onLoad catalog client script method is the correct trigger for dynamically modifying choice list options because it executes when the catalog item form first renders, before the user interacts with the field.

Service Catalog and Request Management

Question

Which of the following catalog client script methods will modify the choice list options available to an end user on a catalog item?

Options

  • AonSubmit
  • BonLoad
  • ConSave
  • DonLaunch

How the community answered

(26 responses)
  • B
    92% (24)
  • C
    4% (1)
  • D
    4% (1)

Why each option

The onLoad catalog client script method is the correct trigger for dynamically modifying choice list options because it executes when the catalog item form first renders, before the user interacts with the field.

AonSubmit

onSubmit fires after the user submits the catalog item form, which is too late to modify the choice list options the user sees.

BonLoadCorrect

onLoad runs immediately when the catalog item form is loaded in the browser, allowing scripts to call methods such as g_form.addDecisionChoice() or g_form.removeDecisionChoice() to control which options are visible to the end user before any input occurs.

ConSave

onSave is functionally equivalent to onSubmit in catalog client scripts and also executes at submission time, not at form load.

DonLaunch

onLaunch is not a valid catalog client script type in ServiceNow and does not exist as an execution trigger.

Concept tested: Catalog client script onLoad method for choice list modification

Source: https://docs.servicenow.com/bundle/washingtondc-it-service-management/page/product/service-catalog-management/concept/c_CatalogClientScripts.html

Topics

#Catalog Client Scripts#onLoad Event#Choice List Manipulation#ServiceNow UI Scripting

Community Discussion

No community discussion yet for this question.

Full CIS-ITSM Practice