- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 02:30 PM
I extended Task on custom tables that I created. When creating new records on these custom tables, sys_class_name is empty on Task, though populated in the custom table. Why might that be?
var gr = new GlideRecord("Task");
gr.query();
while(gr.next()){
gs.info(gr.sys_class_name);
}
yields no info.
var gr = new GlideRecord("custom_table_name");
gr.query();
while(gr.next()){
gs.info(gr.sys_class_name);
}
prints out custom_table_name.
My understanding is that Task should hold sys_class_name, in order to reference the child to which it refers. Am I mistaken? Is there a read-restriction of some sort?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 03:34 PM
in gliderecord query Task should be in lower case., like
- var gr = new GlideRecord("task"); //table name 'task' should be lower case.
- gr.query();
- while(gr.next()){
- gs.info(gr.sys_class_name);
- }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 02:39 PM
I don't think the base task table has a sys_class_name (Task Type). Only tables that extend task.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 02:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 02:51 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2018 03:34 PM
in gliderecord query Task should be in lower case., like
- var gr = new GlideRecord("task"); //table name 'task' should be lower case.
- gr.query();
- while(gr.next()){
- gs.info(gr.sys_class_name);
- }