Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

GlideDBObjectManager.getTable in Scoped App

Karina15
Giga Contributor

Hi,

We have a custom scoped widget for Service Portal that is also reading all the related lists to show them as additional tabs.

 

This line that is giving an error message is: data.tableHierarchy = GlideDBObjectManager.getTables(data.table).toArray().join();

We are trying to replace with: getRelatedTables

But we are getting this error: Function getRelatedTables is not allowed in scope x…

 

Would you be able to provide a method that can be used in a scoped app for Service Portal?

Thank you.

 

Karina

2 REPLIES 2

ianfhawkins
Giga Contributor

var table = new GlideTableHierarchy("cmdb_ci_server");
gs.info(table.getBase())

Inactive_Us2366
Tera Contributor

data.tableHierarchy = new GlideTableHierarchy(data.table).getTables();