Author Topic: [SOLVED] TxnDel giving me an Exception (and grief!)  (Read 1424 times)

johnlewisdesign

  • Member
  • *
  • Posts: 81
[SOLVED] TxnDel giving me an Exception (and grief!)
« 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
« Last Edit: October 22, 2014, 04:52:39 PM by johnlewisdesign »

johnlewisdesign

  • Member
  • *
  • Posts: 81
Re: TxnDel giving me an Exception (and grief!)
« Reply #1 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.

Chris Turner

  • Administrator
  • Member
  • *****
  • Posts: 28
    • Productive Computing, Inc.
Re: [SOLVED] TxnDel giving me an Exception (and grief!)
« Reply #2 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!
Chris Turner
Product Support Specialist
Productive Computing, Inc.

johnlewisdesign

  • Member
  • *
  • Posts: 81
Re: [SOLVED] TxnDel giving me an Exception (and grief!)
« Reply #3 on: November 11, 2014, 07:20:56 AM »
Thanks Chris, nope I actually fixed it myself and posted the outcome, but thanks for checking!