- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2022 02:11 AM
HI All,
Could you suggest javascript code to how to Map variables present in RITM to fields in INCIDENT table.
Thanks
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2022 10:58 PM
Hi,
script should work fine provided
1) the variable on RITM is correct and refers to cmn_department
2) you should insert() and not update
var rec = new GlideRecord('incident');
rec.initialize();
rec.department= current.variables.department;
rec.insert() ;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2022 10:58 PM
Hi,
script should work fine provided
1) the variable on RITM is correct and refers to cmn_department
2) you should insert() and not update
var rec = new GlideRecord('incident');
rec.initialize();
rec.department= current.variables.department;
rec.insert() ;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-22-2022 10:45 PM
HI Ankur,
Thanks Much It Worked!!
Regards