The CreatorCon Call for Content is officially open! Get started here.

Agent Workspace: 'Related task' tab on Interaction form.

rashmianish
Kilo Expert

Agent Workspace: 'Related task' tab on Interaction form is showing REQ numbers related to that particular interaction.

We want to change this configuration to look at sc_req_item table instead.

Please advise if anyone has any information on this. 

1 ACCEPTED SOLUTION

rashmianish
Kilo Expert

Thanks for the suggestion Alberto, after a day of work I was able to configure this. Providing the details below, hoping it will be useful to someone someday 🙂

1. The 'Related Task' in the Interaction related list is populated from a Relationship called 'Related Task'. The records which are populated in the Related list are determined from the interaction_related_record Table

2. As per OOB configurations, there is only a link between REQ and Interaction records i.e through the parent_interaction field.But there is no direct link between RITM and Interaction. So, to fulfill my requirement, a new field called u_parent_interaction was created in the RITM table which is referencing the Interaction table.
Then, created a Before query insert BR on RITM table, which sets the u_parent_interaction same as request.parent_interaction.

3. Another 'after' business rule has been configured which executes when parent interaction field value changes, to created new record on Interaction Related Records table. 

var ir = new GlideRecord('interaction_related_record');
ir.initialize();
ir.document_id = current.sys_id;
ir.document_table = current.getTableName();
ir.interaction = current.u_parent_interaction;
ir.insert();
}

4. Default filter was applied on the 'Related Task' related list to not display REQ's.

View solution in original post

7 REPLIES 7

Riya27
Tera Contributor

Hi 

I'm looking for the same. Did you find the answer? 

Thanks

DNC
Tera Contributor

Hi Riya

It is working for me.

Try this for you

 

Business Rule -

After - Insert 

(function executeRule(current, previous /*null when async*/) {
var ir = new GlideRecord('interaction_related_record');
ir.initialize();
ir.document_id = current.sys_id;
ir.document_table = current.getTableName();
ir.interaction = current.u_parent_interaction;
ir.interaction = current.request.parent_interaction; //(RITM)
//ir.interaction = current.request_item.u_parent_interaction; (TASK)
    
ir.insert();

})(current, previous);

 

 

Thanks

Nagarjuna

DNC
Tera Contributor

Hi 

 

I have missed this one.

 

'a new field called u_parent_interaction was created in the RITM table which is referencing the Interaction table.'

 

Thanks

Nagarjuna