QuickBooks Integrator 2020 C++ Edition

Questions / Feedback?

AddProperty Method

Sets the value of the specified property.

Syntax

ANSI (Cross Platform)
int AddProperty(const char* lpszPropertyName, const char* lpszPropertyValue);

Unicode (Windows)
INT AddProperty(LPCWSTR lpszPropertyName, LPCWSTR lpszPropertyValue);
- (void)addProperty:(NSString*)propertyName :(NSString*)propertyValue;
#define MID_QBOBJECT_ADDPROPERTY 3

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

Remarks

This method should be used to specify the object's property values, before invoking Add.

The properties should be specified one by one, in the same order that they are listed in the SDK documentation. All property values should be formatted as a string; aggregate properties should be formatted with XML tags, as appropriate.

The following pseudocode shows how to add a service line item to QuickBooks.


GenericQBObject1.ObjectName = "ItemService"
GenericQBObject1.ObjectType = "Txn"
GenericQBObject1.AddProperty("Name", "Item name here")
GenericQBObject1.AddProperty("SalesOrPurchase",
  "<AccountRef><FullName>Account name here</FullName></AccountRef>")
GenericQBObject1.Add()

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]