GlideForm - getTableName()

Returns the name of the table to which this record belongs.

On the server side, the table for the current record can be retrieved with current.sys_class_name or current.getTableName().

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
String Name of the table.

function onLoad() {
    if (g_form.isNewRecord() {
        var tableName = g_form.getTableName(); //Get the table name