can we get which table the glide record is pointing to?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2016 11:42 AM
Hi,
Can we user gr.sys_class_name before a insert, just for debug purposes?
Thanksm

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 07:55 AM
With the code you submitted above, gr. will only point to the incident table, it will reference no other table in any way. If somehow, someway it ever did, with that code above, we would ALL be in serious trouble.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2016 10:40 AM
Your use case is unclear; however here is how I do it:
Server side you have the property:
current.sys_class_name;
For client side you have the method:
g_form.getTableName()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2018 04:51 AM
the sys_class_name is a field that is only available on extended tables (and their base table, where it is defined). This means it will not always work. I also don't know exactly when it is set: upon gr.initialize() or after, but the code below may help:
In general, if you want to know information that is populated via default values, you can use the following setup:
var gr = new GlideRecord(<table_name>);
gr.newRecord(); // this will set all the default values
gr.<do your stuff>
gs.info('If I am an extended able: the table name will show here: ' + gr.sys_class_name);
gr.insert()