var gr = new GlideRecord('incident');
gs.info(gr.isValid());
var anotherGr = new GlideRecord('incidentZ');
gs.info(anotherGr.isValid());
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_ScopedGlideRecordIsValid
see https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/TableUtils/concept/c_TableUtilsAPI.html
another option:
var table = new TableUtils("cmdb_ci_computer");
gs.print("Does 'my_table' exist? " + table.tableExists()); //--returns true
var table = new TableUtils("cmdb_ci_computerZ");
gs.print("Does 'my_table' exist? " + table.tableExists()); //--returns false
Comments
Post a Comment