Does anyone happen to know the name of the table I...
# suitetalkapi
b
Does anyone happen to know the name of the table I would query with SuiteQL to get the subsidiaries selected for a kittitem?
m
have you tried a
select * from kititem
? Curious what's in that table https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_1/analytics/record/kititem.html
b
select * from item
gets the top-level fields for a kititem, including a single subsidiary id (
"subsidiary": "1"
), but subsidiaries allow multiple selections. Maybe if I could figure out how to actually select multiple subsidiaries without a validation error about the item location, that subsidiary result would become a comma-separated list?
select * from item JOIN kititemsubsidiarymap ON item.id=kititemsubsidiarymap.item WHERE ...
b
Aha! It is comma-separated. I was able to select multiple subsidiaries on a different type of item and got
"subsidiary": "1, 3"
from the item query. Kititemsubsidiarymap works, too. Thanks, Marc!
m
ah cool!
b
ill give the generic warning about beware parent/child relationship for items that have the
Include Children
checkbox marked