- 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 03:23 AM
just a hunch, is client callable check box set to "yes"
- 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