0

(IMAGE LINNK at bottom of body for reference of the field I'm talking about)

Trying to Add a Class into the top bill section and not just the expense line add section.

This code works fine but the class doesn't show in the main bill.

I tried just putting a class ref outside the expense lines with the vendor ref but didn't work.

Ive also looked at all versions of the xml from this site.

https://developer-static.intuit.com/qbsdk-current/common/newosr/index.html

So just looking to see if anyone has any advice or if there's something I'm missing.

not an accountant so a little confused.

this is the enterprise solutions 19.0 version of quickbooks.

Thanks

<?xml version="1.0"?>
<?qbxml version="10.0"?>
<QBXML>
    <QBXMLMsgsRq onError="stopOnError">
        <BillAddRq requestID=" ">
            <BillAdd>
                <VendorRef>
                    <FullName>
                        Vendor
                    </FullName>
                </VendorRef>
                <TxnDate>
                    2020-02-18
                </TxnDate>
                <RefNumber />
                <Memo>
                    memo
                </Memo>
                <ExpenseLineAdd>
                    <AccountRef>
                        <FullName>
                            Inventory Asset
                        </FullName>
                    </AccountRef>
                    <Amount>
                        334.00
                    </Amount>
                    <Memo>
                        memo
                    </Memo>
                    <ClassRef>
                        <FullName>
                            admin
                        </FullName>
                    </ClassRef>
                </ExpenseLineAdd>
                <ExpenseLineAdd>
                    <AccountRef>
                        <FullName>
                            Freight and Shipping Costs
                        </FullName>
                    </AccountRef>
                    <Amount>
                        20.00
                    </Amount>
                    <Memo>
                        fees
                    </Memo>
                    <ClassRef>
                        <FullName>
                            memo[enter image description here][1]
                        </FullName>
                    </ClassRef>
                </ExpenseLineAdd>
            </BillAdd>
        </BillAddRq>
    </QBXMLMsgsRq>
</QBXML>

image of class field I want to populate

1 Answers1

0

The QuickBooks Desktop SDK does not have functionality to add/mod the Bill Class field, only the individual line class fields. There's a hack workaround that you may be able to setup. In the Accounting section of Company Preferences in QuickBooks (Edit > Preferences > Accounting > Company Preferences tab) you can select the option "Assign class to" and select "Names". This allows you to set a default class when using a Customer/Vendor/Employee. You can do a VendorQuery to get the vendor information to see what class is the default and change it if needed. When you create a bill it will populate the Bill class using the Vendor's default class.

This will only work if QuickBooks is not set to use "Accounts" or "Items" as the "Assign class to" preference, though. If you try to modify the Vendor Class in a VendorMod request and the preference is not set to "Names" you will get an error response:

<VendorModRs statusCode="3250" statusSeverity="Error" statusMessage="This feature is not enabled or not available in this version of QuickBooks." />

Also, as an aside, you may want to set <?qbxml version="10.0"?> to <?qbxml version="13.0"?> if you're using 2019. You get more features (though not Bill Class).

Hpjchobbes
  • 1,309
  • 1
  • 8
  • 11