- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 07:40 AM
Hi All,
I wanted to Run a background script where I need to check the short description which has exact length =100 for all incidents.
Kindly suggest on this.
Regards,
Hussain
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 07:44 AM
Hi,
Please run this script.
var inc = new GlideRecord('incident');
inc.query();
while(inc.next()){
if(inc.short_description.toString().length == 100){
gs.print(inc.number);
}
}
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
‎04-05-2017 08:18 AM
I understand that, but i wouldn't really just go on running this script...there are multiple things to be considered and thats why i asked the actual need here.
Simply put, running this script on a customer instance, chances are high that it will time out or might impact the performance badly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2017 08:23 AM
Agree with that, It should be just executed directly on a production instance.
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
‎04-05-2017 08:39 AM
Hi Hussain,
Please make sure you have gone through the discussion in this thread. The code should be tested on a lower instance first and you also need to verify the current length of the short description field is greater than 100.
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response