Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How to enable and use rollback functionality for Fix Scripts - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How to enable and use rollback functionality for Fix Scripts
KB0761248

How to enable and use rollback functionality for Fix Scripts


17680 Views Last updated : Jan 3, 2025 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Summary

A fix script is server-side JavaScript code that you run after an application is installed or upgraded.

Include fix scripts to make changes that are necessary for the data integrity or product stability of an application.

Administrators and users with the script_fix_admin role can create and run fix scripts.

As of London Release there has been a new option to record a fix script for rollback. To use this option you just need to add the field to the form and you should be able to record your fix scripts using the rollback functionality so that if any issues occur after the fix script you can rollback easily.

Release

London and above

Instructions

When you open up the fix script form by default the record for rollback option is not there. 

System Definition > Fix Scripts

To add this

1) Right click the top menu and select Configure > Form Layout

2) Find the Record for rollback field in the Available slush bucket and move it to the selected slushbucket by clicking the > button 

3) Move the field to wherever you want to have the field on your form.

4) Now you will have the field on the form and if you check this box then run the fix script a rollback context will be created for you to rollback the fix script.

 

Example:

1) I create a test script:

2) I then ran this with rollback ticked

3) After the script was completed I checked the sys_rollback_context table and found the fix script job had run:

4) You can see we have a rollback button so if you encounter an issue after the fix script you will be able to click the rollback button and rollback the changes made because of this script.

 

 

 

Related Links

Documentation about rollback:

https://docs.servicenow.com/csh?topicname=rollback-delete-recovery.html&version=latest

 


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.