sys_class_name is empty on Task?

rako
Kilo Expert

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?

1 ACCEPTED SOLUTION

in gliderecord query Task should be in lower case., like



  1. var gr = new GlideRecord("task");   //table name 'task' should be lower case.
  2. gr.query();  
  3. while(gr.next()){  
  4.     gs.info(gr.sys_class_name);  
  5. }  

View solution in original post

5 REPLIES 5

Ha! Right you are. I guess it has been a long week. Thanks.