Fix script issue
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 08:54 AM
Hi All,
in Incident form we created script include that is pasting caller email to short description. now I want to write fix script to update all record to get email in short description.
what fix script do we need to write update short description with email
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2025 12:02 PM - edited 03-12-2025 12:24 PM
Try the following:
var inc = new GlideRecord('incident');
inc.addExtraField("caller_id.email");
inc.query();
while (inc.next()) {
inc.short_description += '\n' + inc.caller_id.email;
gs.info('New short descrition: ' + inc.short_description);
inc.update();
}
which added the caller's email to the existing short description.