SetCustomField Method
Sets a custom field value within QuickBooks.
Syntax
vendor.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. You must first retrieve the appropriate 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.