Doucment_ID is not displaying value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hi,
I want to update the 'Applies to record' field so it corresponds the Department.
As you can see the Department has a name but Applies To Records = empty.
When looking at XML, however these 2 fields have same sysID, so they should point to that specific Department Name.
Im using a script where I populate both fields with sysID but it only works for the department field.
How to proceed with this document_id type field so it shows the name of the record?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
so you need to set the source_table as well while setting sysId in document id field
-> create a source_table field of type Table Name and then use it in script
Make your Document ID field dependent on that Table Name field
See how it's done for syspproval_approver table
issueGR.setValue('refers_to_existing_table', true);
issueGR.setValue('applies_to', departmentSysId);
issueGR.setValue('source_table', 'cmn_department');
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader

