What is sys_class_name?

praveenpara
Kilo Explorer

HI,

What is sys_class_name? How can I use?

i Have seen many place sea it is using.

ex:

${sys approval.sys_class_name} ${sysapproval} Approval Request${sysapproval.sys_class_name} ${sysapproval} Approval Requestregards,

RRegards,

Praveen

10 REPLIES 10

tanumoy
Tera Guru

sys_class_name is a field present in cmdb_ci table. You can get the details of that column from the dictionary entry.




CMDB Classifications - ServiceNow Wiki


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Praveen,



sys_class_name is the system field present on the table which basically gives the table name. For example


Sample script.


var gr = new GlideRecord('incident');


gr.get('9d385017c611228701d22104cc95c371'); //Hardcoded sys_id for testing purpose


gs.log(gr.sys_class_name); //Will return "incident" i.e the table name



I hope this answers your question.


Hello @Pradeep Sharma ,
I'm wondering if it is possible to get the name of the current table in AjaxUtils?
thank you!

SimoShaf_0-1674048608697.png

 



Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

In above case i.e ${sys approval.sys_class_name} it will return the class name of the record for which the approval is raised for ex : incident,change_request,sc_req_item...