quickbooksqbxml

How to get InvoiceLine from InvoiceQuery in QBXML


When I add an Invoice to Quickbooks with QBXML I use <InvoiceLineAdd> to add invoice lines. How do I get the invoice lines for an invoice when I am doing InvoiceQuery?


Solution

  • The IncludeLineItems tag is what you're looking for. For example:

    <?xml version="1.0" encoding="utf-8"?>
    <?qbxml version="13.0"?>
    <QBXML>
      <QBXMLMsgsRq onError="stopOnError">
        <InvoiceQueryRq>
    
          <RefNumber>ABC123</RefNumber>
    
          <IncludeLineItems>true</IncludeLineItems>
          <IncludeLinkedTxns>true</IncludeLinkedTxns>
        
        </InvoiceQueryRq>
      </QBXMLMsgsRq>
    </QBXML>