Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2024 09:25 AM
You can run the below code in background script or fixed script,
var gr = new GlideRecord('sys_history_line');
gr.addEncodedQuery('u_user=NULL');
gr.query();
while (gr.next()){
var users = new GlideRecord('sys_user');
users.addQuery('name', gr.user_name);
users.query();
while(users.next()){
gr.u_user = users.name;
gr.updateWithReferences();
}
}
Here i have used field as user name which is available in History table because created by was empty
Note: There is already a field called user which is reference to sys_user table which you can use aswell.
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang