Create problem when more than 5 incidents with same CI
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2017 06:12 PM
Hi
I have coded below in after insert BR of incident. But it is not working, can you help here?
var inc=new GlideRecord('incident');
inc.addQuery('cmdb.ci', current.cmdb_ci);
gs.log('count is:' +current.cmdb_ci);
inc.query();
if (inc.next())
var count=inc.getRowCount();
gs.log('count is:' +count);
if (count >5)
{
var pbmtbl=new GlideRecord('problem')
pbmtbl.initialize();
pbmtbl.short_description=current.short_description;
pbmtbl.state='Open';
pbmtbl.insert();
}
Labels:
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2025 05:34 AM
Do we have any solution for this ? I am facing similar issue and looking for an appropriate solution.