Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Modify a script

Modify a script

About this task

Modify the script for all Record Generators (wizard panels) within the wizard.

Procedure

  1. Navigate to System Wizards > Wizards.
  2. Open the relevant wizard.
  3. In the Wizard Panels related list, open the record generator panel(s).
  4. Enter the following script in the Script field for each record generator (Personalize the form to add the Script field, if necessary):
    if ( typeof gs. getRoles ( ) == "undefined" || gs. getRoles ( ) == '' ) { 
    current. insert ( ) ; 
    current. setAbortAction ( true ) ; var gr  = new GlideRecord ( "expert_instance" ) ; if (gr. get (wizard_instance_id ) ) 
    gr. deleteRecord ( ) ; 
    wizard. redirect = "test_page.do?sysparm_id=" + current. sys_id ; }