Plug-ins > FM Books Connector

Debugging BillQuery


I've set up a 'test' database and have everything working as I need for a feature set.

I then migrated the scripts into live file and in testing the live files have found that what works in my test file does not work consistently in my live file. Specifically, I have a Bill listed in the test file and am using BillQuery to pull the QuickBooks TxnId into a field in the database to indicate that this specific bill has been 'posted' to QuickBooks.

I can view the Bill (ie: the Invoice number for a record) in my 'test' file and run the script and it returns the TxnID; when I view the same Bill (ie: Invoice number) in the live file and run the script [pasted from the 'test' file with the appropriate table/field adjustments] the TxnID fails to come over. No error is returned.

Note, I tested this on several records and 12 out of 13 pulled the TxnID correctly... it's just this one record that doesn't work (so far)

My concern is that if I use this methodology going forward I'll end up entering 'duplicate' Bills because my 'test to see if the Bill is already there' fails with a false positive.

Any insight into how I can debug this would be much appreciated.


Geoffrey Gerhard:
Hey, Colleen!

So the Query is on RefNumber?  A result other than "!ERROR!!" would seem to rule out extraneous/unnoticed characters (like spaces/returns) in the Invoice/RefNumber, but implies there was a Response.

It might be useful to see the full xml of the Response, which you get by calling the PCQB_SGetXML( "Response" ) function after the PCQB_RqExecute function (or the PCQB_ZExecute if you're working with raw xml.)

Feel free to post the Response xml if you want a second set of eyes on it. You can also post the steps that create the Query Request, in case there's something there that might jump out.


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

Hey Geoffrey  :)

Thanks for the SGetXML tip!

Just tried the scripts in the two files again and found the following.

In Test file I had _not_ be adding a second 'PCQB_RqAddFieldWithValue ( "EntityFilter::ListID" ; $VendorID ) 'qualifier' when requesting Bills. This value _was_ included when requesting Credits.

In the Production file I had modified the script to ask for that qualifier with both Bills & Credits.

So in Production I commented that step out and was able to get the TxnID.

Still not sure why this worked on some Bills but not this one. Odd.

I also revisited the QB guide and noticed that the proper call appears to be "EntityFilter::ListIDList" ... though trying that produced an error as well
[CODE: -1000
SEVERITY: failed validation
MESSAGE: Error at EntityFilter
Reason:   Element 'EntityFilter' is unexpected according to content model of parent element 'BillQueryRq'.
Expecting: RefNumber, IncludeLineItems, IncludeLinkedTxns, IncludeRetElement, OwnerID.
Field Value:   ]

My aim is simply to make sure that the InvoiceNumber I'm 'double checking' hasn't been posted to _that_ Vendor... but if I use your XML tip I could also 'validate' against the string value.

Thanks for the speedy & helpful response :-)

Hope all is well with you!

Geoffrey Gerhard:
You had it right in the test file: "EntityFilter::ListID" instead of "EntityFilter::ListIDList".

Intuit's error messages leave a lot to be desired--this one points at the parent node, but the real problem is that the node contains no ListIDList element. The error should have said "Reason:   Element 'ListIDList' is unexpected... Expecting: ListID, FullName, ListIDWithChildren, FullNameWithChildren."


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


[0] Message Index

Go to full version