How to insert RITM instead of REQ on interaction record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 02:11 AM
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:
Any assistance in resolving the issue would be greatly appreciated.
Thanks and Regards
Kartik Magadum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2023 06:37 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2023 12:21 AM
HI,
We can use the Associate Record Button for Creating RITM Record in the Related Task of the Interaction Table.