I am trying to add a vendor bill to quickbooks using QBFC in C#. My issue is that if I want to define a custom address for this particular vendor (for just this particular bill), it throws an error saying
QuickBooks found an error when parsing the provided XML text stream
My test code is as follows:
IBillAdd billAddRq = this.mainRequestMsgSet.AppendBillAddRq();
billAddRq.VendorRef.FullName.SetValue(vendBill.transaction.Name);
billAddRq.TxnDate.SetValue(Convert.ToDateTime(vendBill.transaction.Date));
billAddRq.RefNumber.SetValue(vendBill.transaction.DocNum);
billAddRq.VendorAddress.Addr1.SetValue("test");
billAddRq.VendorAddress.Addr2.SetValue("test");
billAddRq.VendorAddress.Addr3.SetValue("test");
billAddRq.VendorAddress.Addr4.SetValue("test");
billAddRq.VendorAddress.Addr5.SetValue("test");
The code works, however, if I get rid of all of the calls to VendorAddress and just leave it like this:
IBillAdd billAddRq = this.mainRequestMsgSet.AppendBillAddRq();
billAddRq.VendorRef.FullName.SetValue(vendBill.transaction.Name);
billAddRq.TxnDate.SetValue(Convert.ToDateTime(vendBill.transaction.Date));
billAddRq.RefNumber.SetValue(vendBill.transaction.DocNum);
Is there something special I need to do in order to define a custom vendor address for this vendors particular bill?