QuickBooks Integrator 2020 Node.js Edition

Questions / Feedback?

SetCustomField Method

Sets a custom field value within QuickBooks.

Syntax

journalentry.setCustomField(fieldName, fieldValue, [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 requires QuickBooks 2004 or above, with QBXMLVersion set to at least "3.0".

This method will immediately set the value of a QuickBooks custom field, which has been defined by the user from within the QuickBooks UI. Before calling this method, the preceding operation must retrieve the object from QuickBooks, using Get, ObjSearch, etc. Then, you may use SetCustomField to set custom field values (the fields will be modified or added, as appropriate).

Note that invoking this method will create a connection to QuickBooks if one is not already in place.

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