Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2017 06:47 PM
Carl,
This is not a recommended method by ServiceNow but i am giving you the script only to over come the issue right now. Would strongly suggest workarounds.
Script:
Make sure you are adding the right field names and use alert conditions if you want to debug.
var sub = g_form.getDisplayValue('subcategory');
var sys;
var ci = new GlideRecord('cmdb_ci');
ci.addQuery('name',sub);
ci.query();
while(ci.next())
{
sys = ci.sys_id;
}
g_form.setValue('cmdb_ci',sys);
*This will work only when you have a condiguration item with the same display name as of subcategory.
Let me know how it goes and mark Helpful or Answered and make help improve community experience.
~Raghu.