- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2018 02:26 AM
i dont want to see the versions here,
perviously there were no versions there. by mistake it got updated by me.
then these versions are showing like this.
i dont want to see this.
there should be no versions.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2018 06:18 AM
var gr = new GlideRecord('sys_update_version');
gr.get('9725bf11db9d6740e4d95740cf9619f0'); // pass the sys_id of those version one by one and run it in background script.
gr.deleteMultiple();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2018 06:24 AM
i would suggest validate it on lower environment and see this ui action is exact same or not
script, condition etc.
then if it's fine run that script in background script .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2018 06:31 AM
i have check in lower environment,
there is no versions at all for this UI Action.
it will be same as all environment , if i will remove these verions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2018 06:32 AM
i was saying you to check the script and condition. is that exact same with prod ui action?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2018 06:10 AM
Hi,
If you really want to delete the version, then copy below script in background script and hit Run :
(Before running verify the code on my dev instance it's working )
var gr = new GlideRecord("sys_update_version");
gr.setWorkflow(false);
gr.addQuery("payload_hash","-1841342483");//Open particular version version and copy payload hash value
gr.setLimit(1);
gr.query();
if(gr.next())
{
gr.deleteRecord();
}
Let me now for other querries.
Mark if Correct/Helpful
Regards,
Ajay