GlideRecordUtil (Global) Flashcards

A utility class for working with GlideRecords The GlideRecordUtil class is available in server-side scripts.

1
Q

Returns the GlideRecord object for the specified configuration item (CI) using just the sys_id of the CI in Server Script.

A

var grUtil = new GlideRecordUtil().getCIGR(String sys_id);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Returns an array of all the fields in the specified GlideRecord in Server Script.

A

var grUtil = new GlideRecordUtil().getFields(GlideRecord gr)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Returns a GlideRecord instance for the given table, positioned to the given sys_id, and of the right class (table) in Server Script.

A

var grUtil = new GlideRecordUtil().getGR(String baseTable, String sys_id)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Returns a Java ArrayList of the ancestors of the specified table name in Server Script.

A

var grUtil = new GlideRecordUtil().getTables(String tableName)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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.

A

var grUtil = new GlideRecordUtil().mergeToGR(Object hashMap, GlideRecord gr, Object ignore)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Populates the given hashmap from the given GlideRecord instance in Server Script. Each field in the GlideRecord becomes a property in the hashmap.

A

var grUtil = new GlideRecordUtil().populateFromGR(Object hashMap, GlideRecord gr, Object ignore)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly