This should be obvious, but just isn't working for...
# suiteql
b
This should be obvious, but just isn't working for me. for a transaction that I can clearly see has a subsidiary displayed in the ui, I run the query
SELECT t.id, t.toSubsidiary from transaction t   where recordtype='salesorder' and t.id=20188
and toSubsidiary is null (I've also tried uncased tosubsidiary). Is there some right that I'm missing (I'm running the SuiteQL query tool with an admin role, so I should have whatever right I need. I can see salesOrdered.subsidiary, if that is informative
c
I'm not familiar with
toSubsidiary
but I imagine it's only populated when you're dealing with an intersubsidiary transaction. Maybe join
transactionline
on
transactionline.transaction = transaction.id
and return
transactionline.subsidiary
? You can filter to
transactionline.mainline = 'T'
if need be.
z
toSubsidiary is used in intercompany transactions. Check out the Record catalog and relationship between transaction and subsidiary
b
I expected to find a transaction subsidiary field in the record catalog to go with the on-screen field, but toSubsidiary is the only subsidiary relationship there. I just pivoted to a salesorder retrieval through the REST API rather than making any assumptions about which transaction line subsidiary value(s) would correspond to the one on the transaction.