QuickBooks Integrator 2020 C++ Edition

Questions / Feedback?

SetCustomField Method

Sets a custom field value within QuickBooks.

Syntax

ANSI (Cross Platform)
int SetCustomField(const char* lpszFieldName, const char* lpszFieldValue);

Unicode (Windows)
INT SetCustomField(LPCWSTR lpszFieldName, LPCWSTR lpszFieldValue);
- (void)setCustomField:(NSString*)fieldName :(NSString*)fieldValue;
#define MID_SALESORDER_SETCUSTOMFIELD 13

INQB_EXTERNAL int INQB_CALL InQB_SalesOrder_Do(void *lpObj, int methid, int cparam, void *param[], int cbparam[], int64 *lpllVal);

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.

Error Handling (C++)

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

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