The CreatorCon Call for Content is officially open! Get started here.

Programatically get a glide record as an xml

Siva28
ServiceNow Employee
ServiceNow Employee

I have a requirement to get a record of any table as an xml. 

I know that we could do the same by using "show xml" from the context header of the record. 

I am looking at ways to do the same programatically.

Thanks

1 ACCEPTED SOLUTION

Siva28
ServiceNow Employee
ServiceNow Employee

Found the solution:

GlideappUpdateVersion.getHeadVersion(name);

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Siva,

So basically you want some UI action which when clicked will show the xml of the record?

Or you want xml of the record in some server side script such as BR or script include once you know the record sys_id?

Regards

Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Siva28
ServiceNow Employee
ServiceNow Employee

Found the solution:

GlideappUpdateVersion.getHeadVersion(name);