Notification triggering multiple times when sc task is updated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi,
I have created a notification in sc_task table and it should trigger based on the variable. I have variable called ready for education in task only visible which is checkbox and in task if it set to check then it will trigger notification but what is happening is whenever sc_task is updated this notification is triggering all the time, So I wanted this notification to trigger only once only when it is true not when ever record is updated.
I tried checking conditions and advanced condition script. if feel something is wrong can some one help me with this. attaching screenshot for reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
There could be a couple things going on with your script. The Conditions include the variable is true, so don't replicate that in the script, and you don't need to return a false answer. First simplify all of that, then try true instead of 'true' in the evaluation.
if (previous.variables.ready_for_education != true) { // or 'true'
answer = true;
}
It's also possible that the previous object is not available to variables, since you can't set the operator in the Condition to 'changes' like you can with fields, so you might have to use a script more like this in conjunction with your existing Conditions:
if (current.variables.ready_for_education.changes()) {
answer = true;
}