Backout changes captured in UpdateSet

saumyan
Giga Contributor

Hi,

I have an update set created with multiple dummy catalog items captured in it (over 15k customer updates). I would like to get rid of these dummy catalog items and its variables from our instance now. Since there are multiple tables entries when a catalog item is created, manual deletion of so many updates is very difficult.

Tried to delete them through Update Set -> Backout. Steps followed
1) Marked update set complete -> Backout the update set, deletes the update set but does not delete the items created/updated in it.
eg. An update set with a client script added to it was marked complete and backedout. The update set got deleted but the client script was available in instance.

Please suggest what is the best way to get the items removed from the instance.

Thanks,
Saumya

6 REPLIES 6

Community Alums
Not applicable

Saumya,

You may have already gotten some information on this external to the community, but I wanted to take a shot. Update Sets do not capture or work with data at all. If you still need to perform some sort of mass delete of these records, there are some good suggestions in response to this other community post: Mass delete of records from a list.

I hope this helps.

ben


saumyan
Giga Contributor

Hi Ben
Thanks for redirecting to the link. But we have create many sample catalog items (catalog item + variable + question choices) dynamically to meet one of our client requirements. Cascade Delete is not set up for these table (sc_cat_item and sc_item_option_new). So we will have to delete all the records manually. This deletes will have to be done on all instances till Production, as we would have created many such dummy catalog items as part of our testing.

Since we have the update_sync set up on these tables, the creation/updates are captured in the Update Set. ServiceNow(SN) backout feature helps to get rid of unwanted changes from a Retrieved Update Set. So was wondering if the same inbuilt feature can be used for the updates created on the instance (instead of retrieved), will help us as
1) reduce our work of manual deletion
2) ensure no items are left undeleted
3) We won't endup deleting genuine Catalog Items/VAriables/Choices.

Thanks,
Saumya


Community Alums
Not applicable

Saumya,

Just to make sure I am clear here, Update Sets will help you transfer things like table structures and form configurations, but Update Sets never work with the data contained in a table. The backout feature only works to get rid of the same updates to the tables and forms. It also will not remove data.

As I understand it from your description, you have a lot of sample data you want to remove. If you now want to remove that data now, Update Sets cannot help you. You would need to look at some sort of mass delete process. That is why I shared that article with you, as it has some different ways to mass delete records from the database. If your "real" records are few, you could export them, delete all the data from the table, and then import the real records back in.

If you have some way to distinguish your sample records, then setting up the ability to view more records per page, filtering on that field that allows you to distinguish, and deleting the records might be the best way to handle the situation.

ben


Hi Ben,

Update sets do not move data such as tasks, but they do move configuration-type data. For instance, update sets do capture changes to business rules, client scripts, and, yes, service catalog items (the item definitions but not service catalog requests or tasks). To learn more about which changes are tracked, see:

http://wiki.service-now.com/index.php?title=System_Update_Sets#Determining_Which_Customizations_are_Tracked

I think the issue here is how to remove the sample items and the associated variables and question choices in a non-manual way.

Saumya,

I'm not sure of your goal, but may be easier to create a new update set that contains only the desired items. Here's an idea (not sure how feasible it is):
1. Create a new update set and select it as your current set.
2. Filter your catalog items list to show only the desired items.
3. Right-click the header and select Update All.
4. Make a nominal change to the records (e.g., change Active to False). All of the records and related records are added to the new update set.
5. If necessary, reverse the nominal change (e.g., repeat steps 3 & 4 but change Active to True).
6. Set the Update Set to Complete. You now have an update set that contains only the desired items and all related records. You can move this update set to a clean instance.

Not sure if this solves your problem, though. Good luck!

-Rachel