Plug-ins > FM Books Connector

Push Payment to Specific Invoice

(1/1)

garry_n:
I've been trying to push a payment from FMP to a specific QB Invoice without success. I'm getting this error:

CODE: 3120
SEVERITY: Error
MESSAGE: Object "16FDDA-1255877379" specified in the request cannot be found.

I have checked and 16FDDA-1255877379 is the Invoice TxnID returned by QB.

New Add Payment
Set Field [ InvoicePayments::_QB Results; "" ]
Set Error Capture [ Off ]
Allow User Abort [ Off ]
Freeze Window
Set Field [ InvoicePayments::_QB Results; PCQB_EndSession ]
Set Field [ InvoicePayments::_QB Results; PCQB_BeginSession(Main::QB File Path;"") ]
Set Field [ InvoicePayments::_QB Execute; PCQB_GetCurrentFileVersion ]
#Prep Payment info (Request)
Go to Layout [ “Layout #1” (InvoicePayments) ]
Set Field [ InvoicePayments::_QB Results; PCQB_RqNew("ReceivePaymentAdd" ; "" ) ]
Set Field [ InvoicePayments::_QB Results; PCQB_RqAddFieldWithValue( "CustomerRef::ListID" ;POForms::QB Customer TxnID) ]
Set Field [ InvoicePayments::_QB Results; PCQB_RqAddFieldWithValue( "TotalAmount" ;InvoicePayments::Payment Amount) ]
Set Field [ InvoicePayments::_QB Results; PCQB_RqAddFieldWithValue( "AppliedToTxnAdd::TxnID" ;POForms::Invoice TxnID) ]
Set Field [ InvoicePayments::_QB Results; PCQB_RqAddFieldWithValue( "AppliedToTxnAdd::PaymentAmount" ;InvoicePayments::Payment
Amount) ]
#Insert Payment - Open Session, Execute and Close Session
Set Field [ InvoicePayments::_QB Results; PCQB_RqExecute ]
#Check for Errors
Perform Script [ “Check for Errors” ]

Can anyone see where I have made an error?

Thanks for your hep.

garry_n:
Greetings,

I spent about month trying to figure this out. I was getting the same results. You need to specify the Accounts Receivable Account the payment will be applied to:

PCQB_RqAddFieldWithValue( "ARAccountRef::FullName" ;"ACCOUNTS RECIEVABLE")
(note: your ARAccountRef::FullName may be different than "ACCOUNTS RECIEVABLE")


Thanks to Chris Kuhn at Productive Computing for the solution.

Navigation

[0] Message Index

Go to full version