Whenever work notes / comments changes on the incident, it should get copied to all associated incident tasks. Also when work notes of incident task changes it should get copied to the incident. Also no notification should trigger during this activit

punitchourey
Tera Contributor

Hi All,

We have below requirement:

 

Whenever work notes / additional comments changes on the incident, it should get copied to all associated active incident tasks. Also when work notes of incident task changes it should get copied to the incident work notes. Also no notification should trigger from the record at which the work notes / additional comments are getting copied. 

 

Thanks

1 ACCEPTED SOLUTION

Hi Punit,

I believe you must be using business rule to trigger the REST/SOAP endpoint?

So basically you don't want to trigger API call when something updates from script but only when it is updated in some user' session?

If yes then you need to add this in the BR condition which triggers the API call

gs.getSession().isInteractive()

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

First you'll need to create 2 Registry Events with different Event names - one on the incident table, and one on the incident_task table.

find_real_file.png

Next, modify each business rule script to include a line like this

gs.eventQueue('inc.wn.comments.updated', current, '','');

It can go anywhere, but might as well make it the first line.  So when each business rule runs it will trigger the event - and the business rule(s) only runs on one of the tables with each unique update.  Finally, change your notifications to Send when Event is fired

find_real_file.png

 

 

Hi Punit,

So you want that notification to be triggered only when somebody actually changes the comments from front end i.e. in users session?

You don't require it when updated from script?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

punitchourey
Tera Contributor

Hi Ankur,

Yes, not only the notifications but also all other activities too.

Thanks

Hi Punit,

for notifications atleast you can try some approach; can you explain other activities meaning?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

punitchourey
Tera Contributor

Hi Ankur,

We have an integration in place which creates/updates a record of another tool whenever work notes gets updated. 

Also instance to instance integration is also in place. So whenever an update(specially work notes and comments) takes place in one instance it updates the record of another instance.

So in case of copied work notes and additional comments, we do not want the update to happen.

Thanks