QuickBooks Automation using QBFC13Lib
I am attempting to automate some of the tedious functions in QuickBooks using the QBFC13.dll ("QBFC13Lib"). Specifically, right now I am trying to apply a VendorCredit to a Bill. I create the Vendor Credit with QBFC13Lib.IVendorCreditAdd, and can successfully save this, acquiring a QBFC13Lib.IVendorCreditRet object. I can also create a Bill by using QBFC13Lib.IBillAdd, acquiring a QBFC13Lib.IBillRet.
If I create the VendorCredit first, and attempt to apply this to the bill using the LinkToTxnIDList method, I am told by the QBFC13Lib.IResponse that LinkToTxnIDList cannot be linked to VendorCredit. There is no similar method with the QBFC13Lib.IBillMod. I can get apparently closer with the QBFC13Lib.IBillPaymentCheckAdd, and using the ppliedToTxnAddList.Append() method to create an IAppliedToTxnAdd object. However, when I append the bill's Transaction ID to the TxnID value, and the Credit's Transaction ID to the SetCreditList's CreditTxnID, I am given the message that the Credit's Transaction ID cannot be found, despite getting the ID from the Vendor Credit object.
How am I meant to apply a Vendor Credit to a bill?