Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How records get associated to Related Tasks on a Interaction form in Agent Workspace?

Mahesh Kumar7
Mega Expert

If you observe the snapshot below:

There are 9 user tasks and no Related Tasks initially.

However, once I just open any record from User's Tasks it starts showing that record in Related Tasks, even if I do not modify that user task record.

I just want to how is this record getting attached into Related task. Which client script/ script include is involved in this functionality? Any pointers to this will be really appreciated.

find_real_file.png

14 REPLIES 14

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

That is nothing but a Relationship:

YOu can go to Relationship in left navigation as below:

URL:

https://instanceName.service-now.com/sys_relationship_list.do?sysparm_query=nameSTARTSWITHRelated%20TAs&sysparm_view=

Thanks for your quick response, but honestly speaking I didn't get how exactly the records are getting attached automatically once I click to open any record from user tasks.

The relationship contains the below script:

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

What is SUBQUERY and ENDSUBQUERY exactly mean here?

And this encoded doesn't look like a normal encoded query which we copy from a list view.

Mahesh Kumar7
Mega Expert

@Chuck Tomasi @Pradeep Sharma @Ankur Bawiskar @Mark Roethof @Dan Bruhn @Jaspal Singh 

 

Request you to help me out in this.

I just want to know how a record comes in Related Task when I just open a record from User's task in agent workspace. I do not even modify the record, just a click and it gets into related task list.

 

Regards,

Mahesh Kumar

I'm experiencing a similar situation when I escalate from interaction to a request. [interaction_related_record] table doesn't populate a record until I display the request item. Any thoughts on this?

Thanks,

Don