about deleteRecord() method
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi all,
actually when i was trying to delete by using this deleteRecord() it is showing deleted records from all the tables but i only make it for incident so how it affect the remaining ones and another thing is that if i can delete many records at a time by using delete multiple then why to use deleteMultiple()
var gr=new GlideRecord("incident");
gr.addquery("priority",5);
gr.query();
while(gr.next())
{
gs.info("the record is deleted"+gr.getValue("number"));
gr.deleteRecord();
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
59m ago
There are out of box business rules to 'cascade' the deletion so that records attached to the deleted record (incident in this case) are not orphaned. This link has a good description of both