The CreatorCon Call for Content is officially open! Get started here.

How to get table name when looking at list of records?

Justin1
Kilo Expert

Looking to get table name at the current list with a UI Action List Button.

Is there an OOB method to retrieve a table name of the current list you're looking at?

1 ACCEPTED SOLUTION

Sagar Pagar
Tera Patron

Hi Justin,

 

Try this,

g_list.getTableName();  OR  current.getTableName();

 

Regards,

Sagar Pagar

The world works with ServiceNow

View solution in original post

10 REPLIES 10

Madhuri,

Thank you for replying. However, I'm wondering if there's a way to retrieve table name in a client script so an alert can occur with that table name.

waqar5
Kilo Expert

 

current.getTableName();
// or for client script something like below.
g_form.getTableName();

If I'm in list view and looking at a list of records, I don't believe the g_form object is available unless I'm looking at an individual record.

in that case "g_list" is your savior 

Sagar Pagar
Tera Patron

Hi Justin,

 

Try this,

g_list.getTableName();  OR  current.getTableName();

 

Regards,

Sagar Pagar

The world works with ServiceNow