Home Forums CoreObjX / DB finding sales order

This topic contains 0 replies, has 1 voice, and was last updated by  Janice 2 years, 8 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #63826

    Premium Member

    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.

    The trace for it is:

    <CoreObjXLog CompanyPath=”C:\LucasOil\Lucas Oil Products (Canada) Co..QBW” qbXMLVersion=”13.0″ ProductName=”QuickBooks Premier Edition” MajorVersion=”26″ MinorVersion = “0” CoreObjXVersion=”7.0.170″>
    <?xml version=”1.0″ encoding=”ISO-8859-1″?><QBXML><QBXMLMsgsRq onError = “continueOnError”><SalesOrderQueryRq><MaxReturned>1</MaxReturned><PaidStatus>NotPaidOnly</PaidStatus><IncludeLineItems>true</IncludeLineItems></SalesOrderQueryRq></QBXMLMsgsRq></QBXML>

    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
    Dim retcode
    If qConn.ProductName = “” Then

    If Not qbConnect Then
    MsgBox “Could not open connection to QB”
    Exit Function
    End If
    End If
    qConn.DebugLogPath = QB_TRACE
    ‘ Get a sales order
    SalesOrders.GetAll True, 1,qbPaidStatusNotPaidOnly
    Debug.Print SalesOrders.Count
    Set oSO = SalesOrders(1)

    ‘ Update all of the line items
    For Each oLine In oSO.ItemLines
    oLine.Description = oLine.Description & ” This was upated”

    Thank you for your help.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.