Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

Not applicable

I don't think the base task table has a sys_class_name (Task Type). Only tables that extend task.



Tim


Thanks for the note. It is indeed there on the Task table.



Screen Shot 2018-01-05 at 4.41.22 PM.png



Further, navigating to the record from the Task list does take one to the custom_table_name record.


Also, interestingly, it is actually a visible field on Task list. Appointment is the name of my custom table.



Screen Shot 2018-01-05 at 4.49.25 PM.png


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. }