how to delete an update set

Stella5
Kilo Contributor

how to delete an update set

6 REPLIES 6

Marshall Day
Mega Expert

Stela,


I see many different posts with many different suggestions for this issue so let me add my 2 cents to the topic.



In the process of development work, I create, test, and migrate my work in an update set from a DEV instance to a TEST instance where I have it validated by our QA team. There are many times that the results of that testing is that there is a change in requirements or a change in process.



Here is where I differ in my process to make the corrections or changes to those records in the TEST instance. I highly recommend that you do no alterations or changes to the records that you migrated in.



1. I go to my TEST instance, System Update Sets > Local Update Sets. I open the update set that is needing correction and select Back Out. So long as there has been no changes to the records that are included in the update set, the update set will back out cleanly with no issues.


2. Then I select Retrieved Update Sets and select the same update set that I have just backed out. I delete all Customer Updates and then delete the update set using the Delete button. This will remove the update set from the TEST instance.


3. I open my DEV instance, go to System Update Sets > Local Update Sets and select the same update set that I am working on and change the State from Complete to In Progress.



At this point you can go into the areas that you need to make corrections, make your corrections or adjustments, and Force to Update Set the records that you have just fixed. When you are ready, you can then change the State to Completed and migrate the update set to your TEST instance again for validation.



This may seem a lengthy way to do update set migration/corrections but I personally hate having to list multiple update set Fix 1, Fix 2, etc., in my Change Requests.



This is by no means a diss to other developers' methods, this is just the way that I prefer to work my development through migration processes. Consider it a friendly passing of yet another way to get things done.



Marshall


pawan k singh
Tera Guru

You shouldn't delete update set, use "Back Out" option on updatesets. But if it needs to do it anyway, use below script.

var sysid = "ADD YOUR  UPDATE SET SYSID HERE";

var gr = new GlideRecord('sys_update_set');
if(gr.get('sys_id', sysid)){
gr.deleteRecord();
gr.update();
}
 
Please mark my answer helpful, if it helped you.
Regards
Pawan K Singh