Catalog client script considerations

When you create catalog client scripts, be aware of the following considerations.

  • Catalog client scripts run when a user orders an item from the service catalog. Catalog client scripts can also run when variables or variable sets for a catalog item are displayed when a user requests that item.
  • For a variable to be accessible using a catalog client script, it must have a variable name. Variables without names do not appear in the list of available variables.
  • When using standard client scripts on a Requested Item or Catalog Task form, make a note of fields with the same name as variables. If a table field and a variable of the same name are both present on a form, the table field is matched when it is accessed using a script. If this happens, specifically address the variable by naming it variables.variable name. For example: g_form.setValue('variables.replacement', 'false');
  • If you are using record producers to pass variables from the service catalog to other types of records, these variables are made visible in those records with a variable editor, such as the Change Variable Editor UI formatter on Change request forms. You can manipulate these variables using standard client script methods, such as setDisplay, setMandatory,setValue, and getValue.
  • Catalog client scripts can be used for catalog items included in a wizard.