I'm using C# and QBFC13 to connect to the desktop edition of QB Enterprise 13. I'm creating Bills and then creating a Bill Payment Check to pay those bills. I keep getting the error "Object 48E-1425590500 specified in the request cannot be found." That number is the TxnID of the bill the check is paying. I'm 100% sure I'm using the correct TxnID because I got it directly from the Bill. The relevant code is below. Any assistance would be greatly appreciated.
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"]);