regarding backend name

shreya_3009
ServiceNow Employee
ServiceNow Employee

how can i know the backend name of additional comments

6 REPLIES 6

@shreya_3009 

then use this to get all the values

var fieldName = 'comments';

var rec = new GlideRecord('sys_journal_field');
rec.orderByDesc('sys_created_on');
rec.addQuery('name', current.getTableName());
rec.addQuery('element', fieldName);
rec.addQuery('element_id', current.sys_id);
//rec.setLimit(1); // use this when you want latest comments
rec.query();
while (rec.next()) {

    gs.info(rec.value);

}

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

GlideFather
Tera Patron

Hi @shreya_3009,

 

I believe it's "comments":

GlideFather_0-1761572426249.png

The screenshot is from Task system dictionary:

https://yourinstancename.service-now.com/nav_to.do?uri=sys_db_object.do?sys_id=e1889ceb5ca312104f3496f8659cf69d

 

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */