How to find --Active, inactive records in incident table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2016 12:43 PM
function onAfter(current, previous)
{
var inc = new GlideRecord('incident');
inc.addInActiveQuery();
inc.query();
while(inc.next())
{
inc.short_description='welcome' ;
inc.update();
}
}
i have tried this ...not working.......

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2016 12:59 PM
I actually have not played with addActiveQuery() much....
I usually just use inc.addQuery('active',true) --or false whichever you are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2016 08:10 AM
thanks,,
sorry to say this, ...but this not working......
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2016 02:07 PM
You spelled it wrong. One uppercase to much..
should be like this: inc.addInactiveQuery();
with a lower case "a" in "Inactive"
http://wiki.servicenow.com/index.php?title=GlideRecord#addInactiveQuery&gsc.tab=0
//Göran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2016 08:13 AM
it is not working......can you plse give clear view about this....