Checklist items and worknote notifications

KB15
Giga Guru

I'd like to use checklists however they're tied to worknotes in incident. We currently have a notification for worknotes when it changes however since each checklist addition fires a worknote, this is not a useful feature.

What's the best way to prevent worknotes from being added when a checklist item is created or added? I'm not sure what condition I can use to prevent it.

1 ACCEPTED SOLUTION

KB15
Giga Guru

I've found a solution. Basically, a scripted custom condition was added to our worknotes notification:



var notes = current.work_notes.getJournalEntry(1);


if (current.work_notes.changes()){


    if ((notes.indexOf('Checklist item:')>-1) || (notes.indexOf('Checklist created')>-1) || (notes.indexOf('Checklist deleted')>-1))


          {


    answer = false;


          }


else


    {


  answer = true;


    }


}



This will suppress any triggers if the worknote includes "Checklist item" or "Checklist created" or "Checklist deleted" while still keeping the audit data.


View solution in original post

15 REPLIES 15

I'll check it out. But wouldn't it make sense to keep the worknote in there so you know when it was added for audit purposes?


This may be a good workaround but for auditing purposes, it may not be a great option.



It'd be great to have a condition so that the notification wouldn't fire.


I've opened a HI ticket with SN to see what they come back with.


I am actually in the process of creating a new field called Checklist History, and having the script write the information there instead.   That way it will be available for audit history, but not show in the work notes.


KB15
Giga Guru

I've found a solution. Basically, a scripted custom condition was added to our worknotes notification:



var notes = current.work_notes.getJournalEntry(1);


if (current.work_notes.changes()){


    if ((notes.indexOf('Checklist item:')>-1) || (notes.indexOf('Checklist created')>-1) || (notes.indexOf('Checklist deleted')>-1))


          {


    answer = false;


          }


else


    {


  answer = true;


    }


}



This will suppress any triggers if the worknote includes "Checklist item" or "Checklist created" or "Checklist deleted" while still keeping the audit data.


Hi kkim,



I'm looking at implementing the same sort of thing on my site - would you be able to share the actual object you updated to add the custom code mentioned above?