GlideRecordUtil (Global) Flashcards
A utility class for working with GlideRecords The GlideRecordUtil class is available in server-side scripts.
Returns the GlideRecord object for the specified configuration item (CI) using just the sys_id of the CI in Server Script.
var grUtil = new GlideRecordUtil().getCIGR(String sys_id);
Returns an array of all the fields in the specified GlideRecord in Server Script.
var grUtil = new GlideRecordUtil().getFields(GlideRecord gr)
Returns a GlideRecord instance for the given table, positioned to the given sys_id, and of the right class (table) in Server Script.
var grUtil = new GlideRecordUtil().getGR(String baseTable, String sys_id)
Returns a Java ArrayList of the ancestors of the specified table name in Server Script.
var grUtil = new GlideRecordUtil().getTables(String tableName)
Sets the fields in the specified GlideRecord with the field values contained in the specified hashmap, unless that field name is in the ignore hashmap in Server Script.
var grUtil = new GlideRecordUtil().mergeToGR(Object hashMap, GlideRecord gr, Object ignore)
Populates the given hashmap from the given GlideRecord instance in Server Script. Each field in the GlideRecord becomes a property in the hashmap.
var grUtil = new GlideRecordUtil().populateFromGR(Object hashMap, GlideRecord gr, Object ignore)