Related Task Details in Table API

Vijay151
Kilo Contributor

Hi,

Good day! By using https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/integrate/inbound_rest/reference/... Table API, we need to get the table data. It works well when we try like that https://dev71739.service-now.com/api/now/table/incident?number=INC0009009 (Method GET), but it does not return the details of the related task. How can we get the details of the related tasks by using table API? Thanks!

1 ACCEPTED SOLUTION

Hi Vijay,

Any update on this?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

10 REPLIES 10

Hi Vijay,

you can use table API and query the table endpoint

I assume this is your structure: Account table as parent

Account Team Members is child table;

1 parent will have multiple team members; there is a field on Account Team Members table which refers Account table

use table API for Account Team Members; 

Ensure you use the proper field on Account Team Members table which stores the parent; also the user field on parent field

https://dev71739.service-now.com/api/now/table/account_team_member?sysparm_query=<parent_field>=ACCT0010001&sysparm_display_value=true&sysparm_exclude_reference_link=true&sysparm_fields=parent_field.user_field

Mark Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi,

If you only need parent table ticket number then do API call on task level.

If you need both then seperate API.

Thanks,
Ashutosh

Manoj Kumar16
Giga Guru

You need to make a separate rest API call to get the related tasks, to the task, with the incident reference and then insert the key value pairs from the payload received to your task table. 

Thanks, Manoj, for the response. I need to get the related task details by using table API. Please review my reply note above and support me.

Hi Vijay,

Any update on this?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader