We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Last updated work notes date and time

Mr_Blue
Tera Expert

 

Hello developers,

how to get last updated date and time of a work notes on demand.
i am writing a background script here.
Can you please guide me on this.

find_real_file.png

 

Best Regards,

11 REPLIES 11

Jaspal Singh
Mega Patron

Hi,

 

Not sure if you have checked OOB sys_udated_on (Updated) field that stores the same value.

thank you for reverting, Do you have an example for this sys_udated_on

Hi,

this field is out of the box present on every table -> Updated [sys_updated_on]

Whenever records are updated system automatically changes value for this field with the time record got updated

Please consider marking appropriate reply as Correct & 👍Helpful.

Regards
Ankur

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

Hey All,

I am not getting the right date and time here, Can you please check this if i am making mistakes

var v= new GlideRecord('dmn_demand');
v.addQuery('number','DMND0001607');
v.query();

while(v.next()){
gs.print(v.sys_updated_on);
}