GlideRecord - getAttribute(String fieldName)

Returns the dictionary attributes for the specified field.

Table 1. Parameters
Name Type Description
fieldName String Field name
Table 2. Returns
Type Description
String Attribute values

Scoped equivalent

To use the getAttribute() method in a scoped application, use the corresponding scoped method: Scoped GlideRecord - getAttribute(String fieldName).

doit();
function doit() {
  var gr = new GlideRecord('sys_user');
  gr.query("user_name","admin");
  if (gr.next()) {
    gs.print("we got one");
    gs.print(gr.location.getAttribute("tree_picker"));
  }
}