# suitetalkapi

Marty Chang

03/30/2022, 3:54 PM
Hi everyone! 👋 Is there a way using any NetSuite API (SOAP or REST) to retrieve records from a saved search that also includes child records and grandchild records? We have three objects in play. • ZAB Subscription • ZAB Subscription Item, which is a child of ZAB Subscription • ZAB Count Data, which is a child of ZAB Subscription Item Today we have to execute three separate searches and then go through all of them to match data up to each other. Ideally, I would like to be able to run just a saved search on ZAB Subscription and get back the matching ZAB Subscription records, along with child ZAB Subscription Item records and grandchild ZAB Count Data records for every subscription.


03/30/2022, 4:44 PM
with saved searches you're gonna be able to go at most 1 level deep from your record. So you could do a search for Subscription Items and get Subscription data since its a parent. Same is true for Count Data for Items. You can't go from Subscription own to Count data though. You can do it with 2 searches though it looks like. You may be able to do it with workbooks as they are a little more flexible. You could always email Zone & Co. They may have a way to do exactly what you want already.

Shawn Talbert

03/30/2022, 8:45 PM
You could also consider a SuiteQL query through the REST api.
☝️ 2

Marty Chang

03/31/2022, 5:27 PM
Thank you for the suggestions, @creece and @Shawn Talbert!