Productive Computing, Inc. Support Forum

Plug-ins => FM Books Connector => Topic started by: johnlewisdesign on October 22, 2014, 04:40:23 PM

Title: [SOLVED] TxnDel giving me an Exception (and grief!)
Post by: johnlewisdesign on October 22, 2014, 04:40:23 PM
I've written a script to delete payments but have it wrong somewhere and can't find any pointers online.

Presuming I have the first line incorrect. I need to delete a LOT of payments with immediate effect. Essentially I'm removing a payment added using receivepayment then I need ot make it a loop when it works:

PCQB_RqNew("TxnDel" ; ""  )
PCQB_RqNew("TxnDelType" ; "ReceivePayment"  )
PCQB_RqNew("TxnID" ; Payments_Invoice::QB_TxnID  )

This is the error
CODE: -2147467261
SEVERITY: Exception
MESSAGE: Message:Invalid pointerSource:(null)Desc:(null)

The XML is basically stopped so incomplete so nothing to debug.

Please can someone help a guy out? It's the last piece of the puzzle as I need to delete ad resend >2800 payments right now. Should I be specifying something between the quotes on line 1 or is my line 2 wrong?

Thanks in advance!

John
Title: Re: TxnDel giving me an Exception (and grief!)
Post by: johnlewisdesign on October 22, 2014, 04:52:18 PM
My bad I should have written it as such:

PCQB_RqNew("TxnDel" ; ""  )
PCQB_RqAddFieldWithValue("TxnDelType" ; "ReceivePayment"  )
PCQB_RqAddFieldWithValue("TxnID" ; Payments_Invoice::QB_TxnID  )

Tiredness will do that to a man! Left this thread here for the purpose of helping others.
Title: Re: [SOLVED] TxnDel giving me an Exception (and grief!)
Post by: Chris Turner on October 24, 2014, 10:48:49 AM
Hi John,

I was able to successfully delete a received payment by using the following call sequence:

PCQB_RqNew( "TxnDel" )
PCQB_RqAddFieldWithValue( "TxnDelType" ; "ReceivePayment" )
PCQB_RqAddFieldWithValue( "TxnID" ; $$SomeValidTxnID )
PCQB_RqExecute

The return on RqExecute was a 0, and the payment was deleted entirely from QuickBooks.

Are you still experiencing the issue? If so, would you be able to send us a screenshot of your script and the results of the function calls?

Thanks!
Title: Re: [SOLVED] TxnDel giving me an Exception (and grief!)
Post by: johnlewisdesign on November 11, 2014, 07:20:56 AM
Thanks Chris, nope I actually fixed it myself and posted the outcome, but thanks for checking!