Author Topic: Query All Invoices without EntityFilter  (Read 870 times)


  • Member
  • *
  • Posts: 8
Query All Invoices without EntityFilter
« on: April 28, 2014, 11:17:36 PM »

Is there a way to import all the invoices in QB to FM without the use of the EntityFilter based on customer?

How I have it now (based on the demo file) is like this:
PCQB_RqAddFieldWithValue( "EntityFilter::FullNameWithChildren" ; $$_Customer_Full_Name)

I'd like to be able to bring in every invoice, without having to loop through the customers. It just makes de-bugging easier and they get imported in sequential order instead of the order of the customer.
I'm hoping this is an easy one.

Thanks for the help!

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 468
Re: Query All Invoices without EntityFilter
« Reply #1 on: April 29, 2014, 05:28:59 AM »
You can get a Response that contains all the Invoice record in QB by omitting all filters. You'd need only...

PCQB_RqNew( "InvoiceQuery" ; "" ) &
PCQB_RqExecute ( "Y" ; "" ; "" ) produce the (likely massive) Response. Doing it this way is NOT a good idea if you have a lot of historical Invoice records in QB, because you'll tie up your computer for an extended period while the records are gathered and passed between the two systems.

You're much better off to use a Loop sequence in FMP and apply a filter in your InvoiceQuery to keep the InvoiceResponse record set down to a manageable size. The TxnDateRangeFilter::FromTxnDate and TxnDateRangeFilter::ToTxnDate elements are the easiest to implement, MaxReturned is the most powerful but is more difficult to apply.


Geoffrey Gerhard
Creative Solutions Incorporated
14000 Creekside Drive
Matthews, NC  28105
704) 814-6852