GlideRecord - getTableName()

Retrieves the table name associated with this GlideRecord.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String A table name

Scoped equivalent

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

gs.log('Table: ' + current.getTableName()); 
gs.log('Parent: ' + current.parent.sys_id); 
var item = new GlideRecord('sc_req_item'); 
item.addQuery('sys_id', current.parent.sys_id); 
item.query(); 
if(item.next()){ 
  for(var variable in item.variable_pool) { gs.log(variable); 
  var answer = eval ("item.variable_pool." + variable + ".getDisplayValue()");
gs.log(answer);}
}