Figure out table in which Field changes date and time recorded
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2024 10:30 PM
Hi,
Whenever a state in problem is changed, the date and time in which it was changed is shown in activities tab. But I want to know in which table it is stored in order to execute that in a script. I am attaching the ss for reference. Any suggestion would help.
TIA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 08:12 PM
you can use getDisplayValue() to get the value in user timezone
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2025 01:25 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 01:25 AM
if the table is audited then it gets stored in Audit (sys_audit) table
The data in activities filter is brought and rendered from there.
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2024 02:29 AM
something like this in background script
var probRec = new GlideRecord('problem');
probRec.addQuery('sys_id','recordSysId'); // give correct sysId here
probRec.query();
if(probRec.next()){
var history = new GlideRecord('sys_history_set');
history.addQuery('id',probRec.getValue('sys_id'));
history.query();
history.next();
var auditH = new GlideRecord('sys_history_line');
auditH.addQuery('set',history.getValue('sys_id'));
auditH.addEncodedQuery("field=state^newISFix in Progress^oldISRoot Cause Analysis");
auditH.query();
if(auditH.next()){
gs.info('Update time is' + auditH.getValue('update_time'));
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2026 07:23 PM
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏