- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2019 01:21 AM
Happy Monday all,
Im trying to get a business rule to trigger when a 'Resolve' UI Action is clicked on a 'parent' ticket within a scoped app, but for some reason it never triggers.
my condition is current.state.changesTo(6)
Its an after business rule (I have tried before) .
the BR itself is
function closeRelatedTasks(me) {
var task = new GlideRecord("x_insoa_investec_a_table_caa");
task.addQuery("parent", '=', me.sys_id);
task.query();
while (task.next()) {
gs.print("Task " + task.number + ' closed based on closure of task ' + me.number);
task.state.setValue(6);
task.close_notes.setValue("Resolved by closure of Parent");
task.update();
}
this.closeIncident(me);
}
All help is appreciated!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2019 05:44 AM
It was a mistake in the the code, I replaced
gs.info("case " + lend.number + ' closed based on closure of case ' + me.number);
with
gs.info("case " + lend.number + ' closed based on closure of case ' + current.number);
and it all worked fine! Thanks for the replies all

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2019 01:42 AM
Hi there,
Have you considered using the Condition Builder instead of the condition field?
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2019 02:37 AM
Hi Mark,
Thanks for the response, yes that was my first choice but alas it didn't work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2019 02:43 AM
Can you confirm that the Business Rule is not executed at all? Did you do debugging on this? My guess is it's not an issue with the condition.
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2019 02:56 AM
The reason I didn't think it was working was none of the debug breakpoints were triggered when I changed resolve a ticket to meet the condition, but I've actually just added an info message to the end and its appearing so it must be the script that is nonsense!