How would I auto-close a task?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 08:37 AM
We have a business requirement to create a catalog item that will be used to report on changes made outside of service now. The group will submit the catalog item, and the task should be created and then automatically close. Could anyone give me some ideas on how to do this? Or links to WIKIs that may help?
Would I utilize business rules, or would the workflow take care of this?
Thanks!
- Labels:
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 08:59 AM
Probably a few different ways to do this, but I would put a business rule on the sc_task table that looked for any task where current.request_item.cat_item == 'Your item', and sets it to closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 10:19 AM
Another way to do this would be to use the workflow - just check the advanced button on the Catalog Task activity and use something like the following for the script:
task.state = 3; //closed complete
task.active = false;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2011 10:28 AM
Oh yeah, much simpler 🙂 That's probably the best way to go.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2019 03:38 PM
It worked successfully.
Thanks