How to perform mass update with rollbackSummaryOn some occasions, you want to do perform mass updates on your instance and want to do this safely and with ease to rollback if any issues occur. This article will guide you through a simple method to do this mass update with rollback. As you may know we have the delete recovery product in the system and it will record deletions and keep them available so if any issues you can rollback, now for doing mass updates its not recorded. You may have noticed that in scripts - background you can select the option for record for rollback to record to collect this information but the issue with that is it runs in the foreground and locks you session. This method that we will go through can be easily selected to run in your session or via the backend. DISCLAIMER: No portion of this article is intended to be implemented as-is on a live instance without thorough validation and testing. The contents of this article are provided without warranty or assurance of suitability for any given situation. Usage of any script or implementation provided in this article is done at your own risk. If you wish to run in prod instance, we would always recommend to clone over a sub prod instance and run so you can confirm that you are only updating the records you wish to update.ReleaseLondon and above.Instructions1) Logon to instance 2) Now to get the data/records that you wish to mass update, an easy and simple way is to use the list view to filter a table for the data you wish to update. Once you have the filter you can right click on the blue text and copy query. (This will be used in your script) 3) Go to system Definition > Fix Scripts 4) Create new Fix script and create your script to update the records, Example as below: var gr = new GlideRecord("table_name"); gr.addEncodedQuery('__Paste_query_from_step2_'); gr.setValue('state', 4); gr.setWorkflow(false); // Bypass business rules and workflowsgr.autoSysFields(false); // Do not update sys_updated_by, sys_updated_on, sys_mod_count, sys_created_by, and sys_created_on gr.updateMultiple(); NOTE: When using UpdateMultiple DO NOT use a while loop or gr.next(), you do not need it. It is only needed if you are updating the records one by one.This will cause all the records to be updated with the same information as the first record.Example:5) Now either from the list view or form, personalise/edit and add the field 'Record for rollback' - More information here: KB0761248 6) Now with the field on the form or list view, for your fix script adjust to 'True'. This will now mean when running this fix script you will record it for rollback.7) Click Run fix script, this will prompt you to either select this to Proceed (using current session) or proceed in Background (Background job)8) For this test we will proceed in Background.9) From the fix script form you can click show progress workers which will show you any progress worker running that job.10) Now hopefully everything went smoothly, but in the off chance that something updated that it shouldn't have you can find the rollback context and rollback. 11) Check sys_rollback_context table and you will find the context related to the fix script, and from there you will be able to safely rollback the fix script.If any issues please contact Technical Support.NOTE: Reviewing the rollback context even not for rollback is helpful as it will show you all the records that were updated by running your script.