QuickBooks Integrator 2020 Qt Edition

Questions / Feedback?

GetNextResults Method

Retrieves the next set of results (only applicable for iterative searches).

Syntax

int GetNextResults();

Remarks

A new feature in QuickBooks 2006 allows you to search iteratively. What this basically means is that you can search a customer or transaction list for all transactions, but receive them in chunks of 50 or 100 at a time, instead of one large response potentially containing thousands of entries. This greatly improves response time and also assures that your application does not appear to hang while QuickBooks is putting together the response.

To accomplish such a search, you must set QBXMLVersion to 5.0 or higher. MaxResults will indicates the size of the chunks returned (if set to 0 an iterative search will not be performed). RemainingResults will indicate the number of results remaining. You must also must open and maintain a persistent connection, as searches cannot be continued across sessions. For example:


class.QueryType = qtCustomerSearch
class.MaxResults = 10
class.QBXMLVersion = "5.0"

class.OpenQBConnection()
class.Search()
' Process first set of results here

While (class.RemainingResults > 0) 
  class.GetNextResults()
  ' Process additional results here
Wend  
class.CloseQBConnection()

Note that if you wish searches to operate the same way as they did with previous QBXMLVersions, you may set the IterateResults configuration setting to "False". See Config for more information.

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2021 /n software inc. - All rights reserved.
QuickBooks Integrator 2020 Qt Edition - Version 20.0 [Build 7941]