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

aaronanderson
Kilo Expert

Are you saying you have a checkbox on the form that, when checked and the form is saved, it adds notes to the Work notes? And you're looking for a way to make sure this doesn't cause a notification that is set to autofire when the work notes is updated?


Not exactly. There's no checkbox on the form itself but you can create a checklist. Every checklist item will cause the worknotes notification to fire since they're recorded there. Checklists



It's possible I'm not seeing a condition or an option.


chris_deegan
Giga Contributor

I am looking for the same solution.   I think if we can locate the script that is writing the checklist values to the work notes then we should be able to modify or remove that line.   I will keep looking and let you know if I find anything!


chris_deegan
Giga Contributor

I found the Business Rule that you would need to modify to stop the checklist from adding a work note.   It is called "Add worknote for checklist item CRUD", on the Checklist Item table.   You can either deactivate the business rule, or you can modify which field is getting updated.   To modify the field, change line 23 grTask.work_notes by substituting your desired field for work_notes.



Let me know if you have any questions.



Chris