SuiteQL REST API filter invoices by subsidiary

When trying to filter invoices by subsidiary via SuiteQL we get the following error:

{“type”:”″,”title”:”Invalid search query Search error occurred: Field ‘subsidiary’ for record ‘transaction’ was not found. Reason: NOT_EXPOSED – Field is marked as internal for channel SEARCH\n.”,”status”:400,”o:errorCode”:”INVALID_PARAMETER”}


Data: {“q”:”SELECT id FROM transaction WHERE transaction.subsidiary = 49″}

Is it possible to filter invoices by subsidiary ID?

It is not listed here: (but subsidiary taxRegnumber is)

Rookie Asked on July 1, 2020 in SuiteTalk.
Add Comment
1 Answer(s)

Hi Laurens,

There’s subsidiary on Transaction Line though:

Strange that it’s not on the header but I guess maybe they flow it down to line level.

Hope that might help you.



Intermediate Answered on July 1, 2020.

Thanks Chris.

I can get the transaction IDS by filtering transaction lines on Subsidiary ID. But I only need the “Invoice” transactions with “status IS CustInvc:A”.

It seems this is not possible in one query.

What I can try to do is fetch all invoices via the REST API and select only the IDS that are returned from the SuiteQL query on Subsidiary ID. Very inefficient, but that should work.

Kind regards, Laurens

on July 2, 2020.

It seems this does the job: “SELECT id FROM transaction WHERE type = ‘CustInvc’ AND status = ‘A’ AND id IN (SELECT transaction FROM transactionline WHERE subsidiary = 19)”

on July 2, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor