I can not find all sales orders which are unpaid. It will only return all sales orders regardless of whether they are paid or not. The qbPaidStatusNotPaidOnly appears to be enumerated to 3. If I use 3 or the qbpaidStatusNotPaidOnly I get the following error:
Quickbooks found an error when parsing the provided xml.
If use 1 (or qbPaidStatusAll or nothing) it works fine. Below is the code I am using.
Dim oSO As SalesOrder
Dim oLine As txnItemLine
If qConn.ProductName = “” Then
If Not qbConnect Then
MsgBox “Could not open connection to QB”
qConn.DebugLogPath = QB_TRACE
‘ Get a sales order
SalesOrders.GetAll True, 1,qbPaidStatusNotPaidOnly
Set oSO = SalesOrders(1)
‘ Update all of the line items
For Each oLine In oSO.ItemLines
oLine.Description = oLine.Description & ” This was upated”