The Quickbooks Online API now requires ORDERBY query clauses to come after a WHERE Clause. Versions of LedgerLink prior to 3.2.7 could be susceptible to this bug. The error occurs when getting changed Customers.  The error will look something like this:

  "code": "400",
  "data": {
    "request": {
      "path": "/query",
      "query": {
        "query": "SELECT * FROM Customer ORDERBY FullyQualifiedName WHERE MetaData.LastUpdatedTime > '2019-06-10T05:24:27.743-07:00' maxresults 387 startposition 1"
    "response": {
      "Fault": {
        "Error": [
            "Detail": "QueryParserError: Encountered \" \"where\" \"WHERE \"\" at line 1, column 51.\nWas expecting one of:\n <EOF> \n \",\" ...\n \"asc\" ...\n \"desc\" ...\n \"iterator\" ...\n \"maxresults\" ...\n \"startposition\" ...\n ",
            "Message": "Error parsing query",
            "code": "4000"
        "type": "ValidationFault"
      "time": "2019-07-01T13:29:41.099-07:00"
  "descriptor": "Sending request",
  "errorCode": -2,
  "errorMessage": "400 Bad Request!",
  "scriptName": "Send QBO Request",
  "type": "QBO"

To fix this bug you'll need to copy and paste the contents of one script from the latest version of LedgerLink into your copy.

  1. Download the latest version of LedgerLink from your account at geistinteractive.com
  2. Copy the entire contents of the Script "_Get Changed Data With Standard Query ( startPosition )" to the clipboard
  3. Open the Same script in your file, select all the steps, and delete them.
  4. Paste the new script into the old one. Your file's script "_Get Changed Data With Standard Query ( startPosition )" should now have the exact same contents as the new file does

Thats it you are done.

Still need help? Contact Us Contact Us