Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

We have requests that was closed but still showing as Active =True.

harsh26
Tera Contributor

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.

 

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

you can use before update BR on Request table

Condition: State Changes to Close

Script:

current.active = false;

Regards
Ankur

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

Hayo Lubbers
Kilo Sage

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:

find_real_file.png

 

More info @ https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/field-administration...

 

Regards,

Hayo

Sourabh26
Giga Guru

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