1

I am using QBFC to add invoices and bills to QB from my C# app. I have it successfully creating invoices, but I am having trouble creating bills.

I have updated this question to remove most of the code. I have been removing pieces of the message to determine the issue and it turns out I am getting the error from the VendorAddress attribute. The attribute comes up in intellisense, but generates the error when sent to QuickBooks. Is there no way to override the vendor address?

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="6.0"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError">
        <BillAddRq requestID = "0">
            <BillAdd>
                <VendorRef>
                    <FullName>SENECA</FullName>
                </VendorRef>

                <VendorAddress>
                    <Addr1>SENECA SAWMILL CO.</Addr1>
                    <Addr2>UNIT 136</Addr2>
                    <Addr3>PO BOX 5037</Addr3>
                    <Addr4/>
                    <City>PORTLAND</City>
                    <State>OR</State>
                    <PostalCode>97208-5037</PostalCode>
                    <Country>US</Country>
                </VendorAddress>

                <TxnDate>2018-07-12</TxnDate>
                <DueDate>2018-07-22</DueDate>
                <RefNumber>12345</RefNumber>
                <TermsRef>
                    <FullName>1.0% 20 DAYS</FullName>
                </TermsRef>
                <ItemLineAdd>
                    <ItemRef>
                        <FullName>1248SK</FullName>
                    </ItemRef>
                    <Desc>94080 BF @ $410 per MBF
STUD GRADE FIR S4S ALS KD GM 2x4x8</Desc>
                    <Quantity>17640</Quantity>
                    <Cost>2.1867</Cost>
                    <Amount>38572.86</Amount>
                </ItemLineAdd>
                <ItemLineAdd>
                    <ItemRef>
                        <FullName>124PCSK</FullName>
                    </ItemRef>
                    <Desc>18816 BF @ $400 per MBF
STUD GRADE FIR S4S ALS KD GM 2x4x7&apos; 8 5/8</Desc>
                    <Quantity>3528</Quantity>
                    <Cost>2.1333</Cost>
                    <Amount>7526.39</Amount>
                </ItemLineAdd>
            </BillAdd>
        </BillAddRq>
    </QBXMLMsgsRq>
</QBXML>
Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Jerry Welliver
  • 377
  • 1
  • 13
  • In the future, please post the actual error message you're getting back from QuickBooks. That helps people answer questions quicker/better. – Keith Palmer Jr. Jul 18 '18 at 12:14

3 Answers3

1

The QuickBooks desktop API is versioned, and the versioning is controlled by this line in your example:

<?qbxml version="6.0"?>

You're using version 6.0 of qbXML, and if you refer to the QuickBooks OSR:

You'll see that the VendorAddress component isn't supported until 13.0:

enter image description here

You need to either not include this tag, or change the qbXML version you're using (or potentially do both, if you want to cater to QuickBooks versions that support this qbXML version AND QuickBooks versions that do not support this qbXML version).

Imtiaz
  • 2,484
  • 2
  • 26
  • 32
Keith Palmer Jr.
  • 27,666
  • 16
  • 68
  • 105
  • OK. I will look into it. I am using QBFC so I don't set the version in the xml. I have a routine that checks for the highest version supported and that comes out to 13 so I must not be setting something correctly in the object. Thanks for the help. – Jerry Welliver Jul 21 '18 at 22:37
0

try changing the version number and try again. Let's see if your Quickbook APP desktop version is compatible to it or not.

Example :

<?qbxml version="13.0"?>
ARr0w
  • 1,701
  • 15
  • 31
0

If you're using QBFC, then you can specify the version when creating the message set request

 IMsgSetRequest rqMsgSet = qbSsnMgr.CreateMsgSetRequest("US", 13, 0);
jjthebig1
  • 629
  • 7
  • 12