qbXML status code 3140

Error

A reference names a record the company file does not have; the message says which list (Account, Item, Customer...).

What QuickBooks says

There is an invalid reference to QuickBooks %2 "%1" in the %3. %4

QuickBooks fills in the marked parts when it answers: usually the value, the field, the kind of record and a longer explanation of its own.

It arrives on the response element as statusCode="3140" statusSeverity="Error", with this text in statusMessage.

What to do

Check the referenced record exists -- query for it -- or create it first. An empty value in the message means the reference was sent blank.

Seen from a real company file

  • Answering ItemNonInventoryAdd:

    There is an invalid reference to QuickBooks Account "" in the Item Non-Inventory.

Things to know

  • An add whose *Ref names a record that isn't there answers 3120 when the ref gives a ListID, and 3140 when it gives a FullName

With QuBe Sync's API

QuBe Sync reads QuickBooks' response for you. When ItemNonInventoryAdd gets this code, your webhook receives this JSON:

Webhook state and error
{
  "error": {
    "debug_message": null,
    "error_code": 3140,
    "error_type": "quickbooks_business_error",
    "hresult": null,
    "message": "There is an invalid reference to QuickBooks Account \"\" in the Item Non-Inventory.",
    "user_message": "This request refers to a record QuickBooks doesn't have (for example, an account, item, or customer). Create it in QuickBooks or choose one that exists, then try again. QuickBooks said: There is an invalid reference to QuickBooks Account \"\" in the Item Non-Inventory."
  },
  "state": "error"
}

Wording read from QuickBooks Enterprise Solutions 24.0 (R21_80).