How to insert RITM instead of REQ on interaction record

Kartik Magadum
Kilo Sage

Hello 

 

How can I insert a RITM record into the "Related Tasks" related list of an Interaction record? There is a "Create Request" button on the Interaction record, and upon clicking that button, a list of items to request is displayed. Currently, the request number populates in the "Related Tasks" related list, but I want to display the corresponding RITM of that request instead of the request number.

 

UI Action: Create Request 

current.update();
 var url;
 var activeCatalogsCount = sn_sc.Catalog.getCatalogCount();
 if (activeCatalogsCount === 1) {
     url = "catalog_home.do?sysparm_view=catalog_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
 } else {
     url = "catalogs_home.do?sysparm_view=catalogs_default&sysparm_parent_table=" + current.sys_class_name + "&sysparm_parent_sys_id=" + current.sys_id;
 }
 action.setRedirectURL(url);

 

Relationships: Related Tasks

(function refineQuery(current, parent) {
	current.addEncodedQuery("SUBQUERYsys_id,document_id,interaction_related_record^interaction=" + parent.sys_id + "^ENDSUBQUERY");
})(current, parent);

 

Image for ref: 

KartikMagadum_1-1701166196932.png

 

Any assistance in resolving the issue would be greatly appreciated. 

Thanks and Regards

Kartik Magadum

2 REPLIES 2

Kristen Ankeny
Kilo Sage

It looks like this related list is managed by the "Related Record Definition" - Interaction related tasks. If you open that, it is calling a function from SOWInteractionUtils, which extends SOWInteractionUtilsSNC. You will need to copy the function getTaskAggregationQuery from the SNC version and add to SOWInteractionUtils and make your changes. This will override the OOB functionality with your custom code. 

gagandeep_singh
Tera Contributor

HI,

We can use the Associate Record Button for Creating  RITM Record in the Related Task of the Interaction Table. 

ritm-itr.jpg