Josh Braun
Josh Braun

Reputation: 490

Get all QuickBooks Online accounts regardless of active status

I'm trying to retrieve all the accounts from a company by using the DataService.FindAll(...) method but it only seems to be returning active accounts. Is there a way to get all the accounts regardless of the active status?

I know I've got inactive accounts because I purposely put them there to test and such.

My current line looks like this:

Dim accounts As List(Of Intuit.Ipp.Data.Account) = ds.FindAll(New Intuit.Ipp.Data.Account()).ToList()

I've also tried adding a ... With {.Active = False}... in there too just to see if that would find all that are inactive. Still nothing.

Am I overlooking something or should this work and get me all accounts?

Thanks for any help.

Also, I'm using Intuit's .NET SDK with VB.NET.

Upvotes: 0

Views: 652

Answers (1)

Manas Mukherjee
Manas Mukherjee

Reputation: 5340

You can try this -

SELECT * FROM Account WHERE Active IN (true, false)

ApiExplorer - https://developer.intuit.com/apiexplorer?apiname=V3QBO#Account

JAVA Code

Account account = GenerateQuery.createQueryEntity(Account.class);
String accountQuery = select($(account)).where($(account.isActive()).in(new Boolean[]{true, false})).generate();
service.executeQuery(accountQuery);

Thanks

Upvotes: 1

Related Questions