Author Topic: Pull invoices filter by SalesRepRef  (Read 718 times)

yanirgv

  • Member
  • *
  • Posts: 3
Pull invoices filter by SalesRepRef
« on: January 12, 2012, 02:27:59 PM »
New member here - need help with filtering prior to Invoice Pull.
I am trying to pull invoices from QB AFTER they are filtered by SalesRepRef and date.
The logic is this: as invoices are pulled by looping FM script, it will take far less time to filter them on QB (filter and import instead of import and filter).
It is the same logic as the EntityFilter used to import one client invoices - you filter on QB prior to import.

On the same logic - can I filter by dates on QB prior to import?

Any help highly appreciated...

YG

Geoffrey Gerhard

  • Guru
  • Member
  • ****
  • Posts: 323
Re: Pull invoices filter by SalesRepRef
« Reply #1 on: January 12, 2012, 04:31:29 PM »
Based on its omission from the OSR's EntityFilter description, I don't think it's possible to filter an Invoice Query Request by Sales Rep Ref. You can filter by Transaction Date Range using TxnDateRangeFilter and FromTxnDate by itself or in combination with ToTxnDate.

It's possible to filter a Response by the SalesRepRef (with ListID or FullName) using XPATH, but there's enough complexity to doing so that I'd avoid it in the absence of a truly compelling reason (super-high transaction volume, for example.)

HTH!

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

yanirgv

  • Member
  • *
  • Posts: 3
Re: Pull invoices filter by SalesRepRef
« Reply #2 on: January 13, 2012, 07:49:19 AM »
Thanks for your quick reply Geoffrey.
I worked around it by importing the SalesRepRef first, (PCQB_RsGetFirstFieldValue("SalesRepRef::FullName")) and a simple "if" comparing it to the required Salesman initials. False triggers delete record and next.
So basically I do not "save" any loop cycle, but save importing all other fields to records I do not need.

Thanks for the info regarding date range!