QuickBooks Integrator 2020 Node.js Edition

Questions / Feedback?

Update Method

Updates the entity object in QuickBooks.

Syntax

employee.update([callback])

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for this method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This method is used to update entity (Customer, Vendor, and Employee) records in QuickBooks.

When the method is called, an Update request will be submitted to QuickBooks. The object represented by RefId will have its information updated based on the various property values.

If QuickBooks is able to update the object, it will return a copy of the object, and the values of all properties will be reset from the QuickBooks response. The QBResponseAggregate property will also be set to the entire QBXML aggregate received from QuickBooks.

One condition must be met for an Update operation to succeed: QuickBooks checks a property called EditSequence. EditSequence is similar to RefId, but is changed every time the object is changed. When an Updateoperation is submitted, the server compares EditSequence with its own EditSequence for the object. If they match, this means that the client program has the latest copy of the object, and the Update operation is permitted. If they don't match, an error will be returned.

If this object represents a value returned from QuickBooks (i.e., a Get or Add call has been made, or the QBResponseAggregate property has been set), the EditSequence will be automatically set. Otherwise this value may be accessed through Config.

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