- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2017 09:38 PM
Need script to delete a record for specific given sys_id (xyz) in an incident table(for example)?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 03:24 AM
Hi,
You can try this code
var gr = new GlideRecord('incident');
gr.addQuery('sys_id', 'your_sys_id');
gr.query();
gr.next();
gr.deleteRecord();
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-16-2017 09:57 PM
Thanks everyone, all these method worked for my query .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-23-2024 02:20 AM
Can we delete the table by using the script