Advanced Condition on Notification : Do not send of work_notes contains...

kevinthury
Tera Guru

We have a Notification that will send if conditions are:

  1. Active is True
  2. Assigned_to is not empty
  3. Work Notes changes

We have been asked to modify these conditions and suppress the Notification from sending if the recently added work notes contain a specif phrase that is entered by a integration.

I'm testing the possibility as seen in the image below, but I cannot prevent the notification from sending.  I suspect the Advanced Condition is not entered correctly.  Any suggestions?

 

find_real_file.png

1 ACCEPTED SOLUTION

I believe I have something for you. Try:

 

var worknote = current.work_notes.getJournalEntry(1);
if (worknote.toLowerCase.indexOf("Case record TCN Integration") > -1) {
answer = false;
}

We needed to grab the last work note first, then check for the phrase.

Try that!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

7 REPLIES 7

Allen Andreas
Administrator
Administrator

Is the entry exactly formatted like this? Or could it be lower case etc?

If so, use toLowerCase().indexOf("Do Not Send This")

that will covert it to lower case and then search for it, picking up no matter if it was upper/lower case originally.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Thanks for the suggestion.  That did not help.  I'll keep trying.

Alright, well, if you want to share exactly what you have now we could still take a look, but I've only recommended that because I use that at my company. That wasn't like a 'guess' of code that 'could' work, but literally works for us. We're on Jakarta.

Hopefully you figure it out.

Sorry I couldn't help more!

(Be sure to mark any reply as Helpful or Correct, if applicable)


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

I appreciate you responding.  Here is a screenshot of the Conditions on the Notification.  If you could compare to yours and offer any insight, I'd be grateful.

 

find_real_file.png