The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
The community will be in read-only from Monday 11:59pm (PT) to Wednesday 7:30am (PT)
Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Database Rule

Highlighted
Goody6
Occasional Advisor

Database Rule

I need to set up a rule that does the following:

Set service calls that have been in a status of Pending Closure for 14 days and older to Closed status, which would run every 24 hrs.

Anyone know how to do this.
3 REPLIES
Ruth Porter
Honored Contributor

Re: Database Rule

Hi there,

You can do this with a DB rule as follows:

When SC is modified
Conditions:
1. Status equals Pending Closure with the "Evaluate ..." button set
2. Status equals Pending Closure scheduled
14 days after Registration;Modified with the "only execute once" box checked.

Action:
Data update Staus set to Closed.

The 2 conditions are needed: the first tests that the staus has been changed to Pending closure and the secod tests thst it is still pending closure 14 days later.

Hope this helps, Ruth

http://www.teamultra.net
Goody6
Occasional Advisor

Re: Database Rule

We have 4661 service calls in Pending Status right now, and we are trying to eliminate the number of scheduled tasks. So off of your rule you created it would schedule a task for each one of these current Pending Status service calls, right? We need something that will go through all the service calls once a day and if they are in Pending Closure Status and have been for 14 days or more it will set them to closed. My thinking would be that this would be just one scheduled task a day. Make sense?
Ruth Porter
Honored Contributor

Re: Database Rule

Hi there,

If you do not want to use scheduled tasks I thinbk you would have to write some code to do this externally. As far as I know there is now way to do this using a DB rule.

For the record, I have been involved with implemenations which use the methos outlined in my previous response and this did not cause issues but you MUST use both conditions as I described to keep the number of scheduled tasks to a minimum.

Regards, Ruth
http://www.teamultra.net
//Add this to "OnDomLoad" event