- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 08:02 AM
I have a custom application that inherits from the Incident Table. I had to create a custom business rule to update closed and closed by when I close a ticket because the states got altered for this custom application. After I close the ticket, the updated by becomes "system" and not the person who last updated it (Closed it). But when someone updates the closed ticket again and clicks update, then their name is populated in the Updated by.
Could someone please tell me how to fix this and not show "system" on updated by when we close it?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 09:07 AM
If the transaction happens Async, (Async BR, Workdlow or flow on system session, scheduled job) then the Updated will come as System.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 08:08 AM
Hi @Navaneeth1
I tried this native view and i can clsoed by - System admin ( as logged in user) and updated by also sys admin )logged by user. Its my OOTB PDI only.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 08:32 AM
Hi there,
Can you share in detail how you are closing the record? You do mention business rule, please share in detail.
Unforseen behavior can be expected since you did extend Incident (which is not a good practice to do).
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 08:59 AM
Hey @Mark Roethof ,
I have a custom script that does this in the business rule and the script content is given below:
Condition: current.active.changesTo(false)
Script:
(function executeRule(current, previous /*null when async*/) {
if (current.closed_by.nil())
current.closed_by = gs.getUserID();
if (current.closed_at.nil())
current.closed_at = new GlideDateTime ().getDisplayValue();
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 09:07 AM
If the transaction happens Async, (Async BR, Workdlow or flow on system session, scheduled job) then the Updated will come as System.