Skip to content

Instantly share code, notes, and snippets.

@cmcdevitt
Last active December 14, 2022 21:12
Show Gist options
  • Select an option

  • Save cmcdevitt/b081fe614d3e1b05e9880676f702475a to your computer and use it in GitHub Desktop.

Select an option

Save cmcdevitt/b081fe614d3e1b05e9880676f702475a to your computer and use it in GitHub Desktop.
Change Closed [closed_at] for Testing of VR Auto-Delete
/*
Run in a BackGround Script or a Fix Script
closed_at Type = Date/Time
*/
vit = 'e3ef3a1787fd91102d0b422e0ebb3551';//sys_id of a VIT:: VIT0014433
var gdt = new GlideDateTime("2022-12-14 08:00:01");//Set the time you want here
var vi = new GlideRecord('sn_vul_vulnerable_item');//GlideRecord
vi.get(vit);
vi.setValue('closed_at', gdt);
vi.update();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment