(function executeRule(current, previous /*null when async*/) { var dic = new GlideRecord('sys_dictionary'); dic.addQuery('name=change_request^element!=NULL'); dic.query(); while (dic.next()) { if (current[dic.element] != previous[dic.element] ) { gs.addInfoMessage (dic['name'] + '.' + dic.element + ' has changed!' ); } } })(current, previous);
How to detect which fields are being changed from a Business Rule in ServiceNow?
Working Code Asked question July 21, 2023