Adding communication tasks on incident related list

Liz Abraham
Tera Contributor

Hello,

 

I am trying to add a related list on the incident form that has related communication tasks from the incident_alert_task table. I created a relationship below . it shows me all records from the incident_alert_task but not of the specific incident when I open the incident. What am I missing?

 

LizAbraham_0-1685661381650.png

 

1 ACCEPTED SOLUTION

Manmohan K
Tera Sage

Hi @Liz Abraham ,

 

Please correct the code in the Relationship Communication Tasks as shown below

function refineQuery(current, parent) {

    current.addQuery('source_incident', parent);

})(current, parent);

 

I have tried on my PDI and its working

ManmohanK_0-1685676180550.png

 

 

View solution in original post

14 REPLIES 14

Liz Abraham
Tera Contributor

so, I think I spoke too soon. So i created a plan to trigger if priority is high and category is network. when I create an incident that does not have a plan or tasks, the tasks for the other still shows up. in other words, tasks show up despite associated to incident or not.

@Liz Abraham 

 

Can you share image of the issue and the relationship you created. That would be helpful to debug

Liz Abraham
Tera Contributor

 

Here is the communication Plan definition. 

LizAbraham_0-1685742532267.png

 

Relationship

LizAbraham_5-1685743259648.png

 

 

New incident with priority 2

LizAbraham_1-1685742742352.png

LizAbraham_2-1685742770411.png

 

Incident 2 - priority is not 2

 

LizAbraham_3-1685742853890.png

still shows the tasks even though there is no comm plan related.

 

LizAbraham_4-1685742942570.png

 

 

@Manmohan K  were you able to check the screenshots I provided?

Hi @Liz Abraham 

 

We have to use advanced query to filter and show only priority 2 incidents