Skip to content

Instantly share code, notes, and snippets.

@icerge
Last active October 11, 2018 22:25
Show Gist options
  • Save icerge/397723dd089695f28b10e919a9039c02 to your computer and use it in GitHub Desktop.
Save icerge/397723dd089695f28b10e919a9039c02 to your computer and use it in GitHub Desktop.
Are all these values equal on different stages? Is it always so? What about getUniqueValue()?
var kb = new GlideRecord("kb_submission");
var sys_id_before_init = kb.sys_id;
// undefined
var sys_id_before_init = kb.getUniqueValue();
// null

kb.initialize();

var sys_id_after_initialize = kb.sys_id;
// ""
var sys_id_after_initialize = kb.getUniqueValue();
// null

var sys_id_insert = kb.insert();
// guid1

var sys_id_after_insert = kb.sys_id;
// guid1
var sys_id_after_insert = kb.getUniqueValue();
// guid1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment