(SM) Support Tip: Printing records in XML format in RAD debugger

When using RAD debugger, you can print records – but always have to count the position and look up in dbdict for the field name, if you do not just decide to just guess.

Alternatively, you can create a little ScriptLibrary record with a function to return the parameter as XML string and then call this function from RAD debugger.


This is how to do it:


  1. Create a ScriptLibrary called “RADDebug” (choose any package for that like "BaseUtilities")

With script:

function getXML(record)


   return record.getXML().toXMLString();


  • Test in RAD debugger:

d jscall("RADDebug.getXML", $L.filed)




>d jscall("RADDebug.getXML", $L.filed)

<model name="ScriptLibrary" query="name=&quot;RADDebug&quot;"><keys><name sctype="string">RADDebug</name></keys><instance recordid="RADDebug" uniquequery="name=&quot;RADDebug&quot;"><name type="string">RADDebug</name><script type="string">function getXML(record)


   return record.getXML().toXMLString();

}</script><package type="string">Base Utilities</package><sysmodtime type="dateTime">06/28/16 06:27:11</sysmodtime><sysmoduser type="string">failsafe</sysmoduser><sysmodcount type="decimal">2</sysmodcount></instance></model>