Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QBSDK invoice query

I am using vb.net in visual studio to query my invoices. i get a list of invoice of interest, and as i iterate through the list, i see the for each invoice i have, the invoice.ORInvoiceLineRetList is nothing. here is a snippet of code, although i think i am doing everything right?

resp = SessMgr.DoRequests(msgReq)
resplist = resp.ResponseList
curResp = resplist.GetAt(0)
If curResp.StatusCode = 0 Then
    Dim invoiceList As IInvoiceRetList = curResp.Detail
    Dim curInvoice As IInvoiceRet
    Dim i As Integer
    For i = 0 To invoiceList.Count - 1
        curInvoice = invoiceList.GetAt(i)

if i breakpoint right after the last line, i see curInvoice, and its data (e.g. refnumber), but i need to get to the line items. can someone help? Thanks, Jerry

like image 989
Jerry Dubuke Avatar asked Apr 29 '26 21:04

Jerry Dubuke


1 Answers

If your IInvoiceQuery is called invoiceQuery, add this (just replace invoice query with your IInvoiceQuery objects name if it's called something else)

invoiceQuery.IncludeLineItems.SetValue(True)

before this

resp = SessMgr.DoRequests(msgReq)

and that should fix your problem

like image 161
Ghost Avatar answered May 03 '26 09:05

Ghost