We have requests that was closed but still showing as Active =True.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 02:28 AM
Hi , We have around 5000 request that were closed but still showing as Active=True, I made all of them as Active=False using Background Script.
How to set all future request to Active =False after closure.
Can i apply business Rule here?
Please suggest.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 02:43 AM
Hi,
you can use before update BR on Request table
Condition: State Changes to Close
Script:
current.active = false;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 02:53 AM
Hi,
Is it an extend of Task? If so : there is an out of the box business rule that takes care of the active : Task Active State Management
Description delivered with this:
Task State Management Utility
Helper functions for working with task-type table state attributes, primarily used by the Task Active State Management business rule to set the active field based on state changes
Can be called by any server script to determine inactive states, default work, or default close states for a given table
Configurations are define in the task.state dictionary element, usually using dictionary overrides since state values vary by table.
As an example the dictionary override from incident on the task.state dictionary element:
More info @ https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/field-administration...
Regards,
Hayo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2022 03:48 AM
Hi,
You need to close the related RITM and TASK associated with that request as well.
As you have run the background script to close the request only. If its associated TASK and RITM is still not closed then the request cannot be set to close.
Mark this as Correct/Helpful in case this helps you in anyways.
Regards,
Sourabh
