GlideRecordUtil - getTables(String tableName)

Returns a Java ArrayList of the ancestors of the given table name.

For example, given cmdb_ci_linux_server, this would return cmdb_ci, cmdb_ci_computer, cmdb_ci_server, and cmdb_ci_linux_server.

Table 1. Parameters
Name Type Description
tableName String Name of the table
Table 2. Returns
Type Description
ArrayList A list of ancestors of the specified table

var tables = new GlideRecordUtil().getTables("cmdb_ci_linux_server");
// The result would be "cmdb_ci, cmdb_ci_computer, cmdb_ci_server, cmdb_ci_linux_server".