- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 02:18 AM
Extending the archived records or their references.
Hello, when we archive records, only the display value of choices or references is taken.
Is there a possibility to query also the sys ID.
We archive records with references to the user table.
Since it is known that there are also name changes, we would need the SYS ID of the reference.
So my question is if it is possible to extend this. To get more Values than the Display Value?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 04:17 AM
I used the archived log
var archive_log = new GlideRecord("sys_archive_log");
archive_log.get("id", gr_hrcase_archive.getUniqueValue());
var xmldoc = new XMLDocument(archive_log.payload);
var user_sysid = xmldoc.getNodeText("//opened_for");
gs.log("payload:getNodeText: user_sysid " + user_sysid);
and
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 04:17 AM
I used the archived log
var archive_log = new GlideRecord("sys_archive_log");
archive_log.get("id", gr_hrcase_archive.getUniqueValue());
var xmldoc = new XMLDocument(archive_log.payload);
var user_sysid = xmldoc.getNodeText("//opened_for");
gs.log("payload:getNodeText: user_sysid " + user_sysid);
and