
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â09-12-2018 06:24 PM
Looking for an alternative to GlideRecordXMLSerializer() for a scoped application. Looking to get the entire XML of the glide record.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â09-13-2018 01:26 PM
Try this;
Create a script include under the global application that is accessible from all application scopes and paste this in as the script.
var ScopedXmlSerializer = Class.create();
ScopedXmlSerializer.prototype = {
initialize: function() {
},
serialize:function(currentRecord)
{
var xmlSerializer = new GlideRecordXMLSerializer();
return xmlSerializer.serialize(currentRecord);
},
type: 'ScopedXmlSerializer'
};
I tested in a background script and selected run script in scope <some scope that isn't global> with the following:
var current = new GlideRecord("sys_user");
current.setLimit(1);
current.query();
current.next();
var xml = new global.ScopedXmlSerializer();
var xmlString = xml.serialize(current);
gs.info(xmlString.toString());

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â09-18-2018 08:37 AM
Bit of a work around but seems to be the best solution at this point.