Skip to content

Instantly share code, notes, and snippets.

@cmcdevitt
Last active April 3, 2022 11:01
Show Gist options
  • Select an option

  • Save cmcdevitt/1ab9a364141ccfceda3d1f2e5a141a58 to your computer and use it in GitHub Desktop.

Select an option

Save cmcdevitt/1ab9a364141ccfceda3d1f2e5a141a58 to your computer and use it in GitHub Desktop.
Explore / loop through Gliderecord returned object (keys, array)
var source = new GlideRecord('u_pentest_import_api');
source.addEncodedQuery('sys_import_row=0^ORsys_import_row=NULL');
source.query();
while(source.next()){
keys = Object.keys(source);
for (i=0; i < keys.length; i++) {
gs.info(keys[i] + "::" +source[keys[i]]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment