Modification on the basis of property.

mirza_saquib
Tera Contributor

Hi All,

 

There is the property for the auto closure of alerts which is 168 hrs. I want to restrict this  whenever the associated incident with the alert in (InProgress, Pending & Assigned state).

 

Thanks & Regards

Mirza Saquib Beg

2 REPLIES 2

Mark Manders
Mega Patron

OOB this 7 day property closes resolved incidents after 7 days in that state. Are you saying that you have resolved incidents related to open alerts? Isn't that weird? 

What exactly are you trying to accomplish (and the autoclose BR should be your go to rule to do any changes to this).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Dnyaneshwaree
Mega Sage

You can use below script where you want your logic like BR, Workflow , etc. You can update it as per your req:

For BR:
table = incident
When to run = state changes to InProgress/ Pending /Assigned state

var
property = gs.getProperty('your property name');
property.value = true;   // you can use value as per type of sys_property(168 hrs.)

Please refer below article:
https://www.servicenow.com/community/developer-forum/modify-system-property-with-script-action/m-p/1...

Please accept my solution if it works for you and thumps up to mark it as helpful.

Thank you!!

Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru