Quickbooks 账单付款检查-找不到请求中指定的对象

Quickbooks 账单付款检查-找不到请求中指定的对象,quickbooks,qbfc,Quickbooks,Qbfc,我正在使用C#和QBFC13连接到QB Enterprise 13的桌面版。我正在创建账单,然后创建账单支付支票来支付这些账单。我不断收到错误“找不到请求中指定的对象48E-1425590500”。该数字是支票正在支付的账单的TxnID。我100%确定我使用的是正确的TxnID,因为我是直接从账单上拿到的。相关代码如下。如蒙协助,将不胜感激 billPaymentCheck.PayeeEntityRef.FullName.SetValue(payee); billPaymentCheck.Ban

我正在使用C#和QBFC13连接到QB Enterprise 13的桌面版。我正在创建账单,然后创建账单支付支票来支付这些账单。我不断收到错误“找不到请求中指定的对象48E-1425590500”。该数字是支票正在支付的账单的TxnID。我100%确定我使用的是正确的TxnID,因为我是直接从账单上拿到的。相关代码如下。如蒙协助,将不胜感激

billPaymentCheck.PayeeEntityRef.FullName.SetValue(payee);
billPaymentCheck.BankAccountRef.FullName.SetValue(reader["BankAccount"].ToString());
billPaymentCheck.APAccountRef.FullName.SetValue(reader["APAccount"].ToString());
billPaymentCheck.Memo.SetValue(reader["Memo"].ToString());
billPaymentCheck.ORCheckPrint.IsToBePrinted.SetValue(false);

IAppliedToTxnAdd txn = billPaymentCheck.AppliedToTxnAddList.Append();
txn.TxnID.SetValue(bill.TxnID.GetValue());
txn.PaymentAmount.SetValue((double)reader["Amount"]);

首先检查票据的应付账款账户是否与票据付款账户相同。您可以更改代码以使用账单的应付账款账户,而不是从您的读者处,然后查看是否有效

billPaymentCheck.APAccountRef.FullName.SetValue(bill.APAccountRef.FullName.GetValue());
另一件需要检查的事情是,对于账单和账单付款,收款人是完全相同的

billPaymentCheck.PayeeEntityRef.FullName.SetValue(bill.VendorRef.FullName.GetValue());