ServiceNow Access the active flag from a client side script (g_scratchpad)
Display business rule:
(function executeRule(current, previous /*null when
async*/) {
// --RDS Feb2018 chg enhancements
//-- set scratchpad(s) which can then be used in client scripting/UI
Policy scripts
g_scratchpad.chg_active=current.active;
})(current,
previous);
Client script:
alert(g_scratchpad.chg_active);
//--seems to save scratchpad as a string, hence use:
if(g_scratchpad.chg_active=='true'){
}
Comments
Post a Comment