QuickBooks Integrator 2022 C++ Edition
Version 22.0 [Build 8594]

LineItemGroups Class

Properties   Methods   Events   Config Settings   Errors  

Generates a group aggregate for use in another class's Update request.

Syntax

LineItemGroups

Remarks

There is not exposed a way to directly edit the contents of a line item group when submitting an Update request with a class from this package. You can change the Quantity, but you cannot change the line items contained inside the group line. The LineItemGroups class is used to parse a line item group aggregate. You may then make changes to the individual line items, and then call the GetGroupUpdateAggregate to return an xml aggregate containing your changes. This is then set to the Aggregate property of the line you wish to modify in your Update.

For instance, the following code changes the BillableStatus of all line items and line item groups in the Bill retrieved from QuickBooks.

Bill.Get("123456"); for (int i = 0; i < Bill1.LineItems.Count; i++) { if (!Bill.LineItems[i].GroupName.Equals("")) { // this is a group line LineItemGroups.GroupType = gtBill; LineItemGroups.ParseAggregate(Bill.LineItems[0].Aggregate); for (int j = 0; j < LineItemGroups.LineItems.Count) { LineItemGroups.LineItems[j].BillableStatus = bsHasBeenBilled; } LineItemGroups.QBXMLVersion = Bill.QBXMLVersion; // so that the proper fields are included in the update aggregate. Bill1.LineItems[i].Aggregate = LineItemGroups.GetGroupUpdateAggregate(); } else { // regular line item Bill.LineItems[i].BillableStatus = bsHasBeenBilled; } } Bill.Update();

Property List


The following is the full list of the properties of the class with short descriptions. Click on the links for further details.

DescriptionA string description of the item group specified by GroupName or GroupId .
GroupIdReference to a group of line items.
GroupNameReference to a group of line items.
GroupTypeThe type of line item group aggregate to create.
LineIdIdentification number of the transaction line group, used for Updates.
ItemCountThe number of records in the Item arrays.
ItemAggregateContains an XML aggregate of the line item.
ItemAmountLine item property: the total amount of this item.
ItemBillableStatusLine item property: Billing status of this item.
ItemClassIdLine item property: Reference to the class of the item.
ItemClassNameLine item property: Reference to the class of the item.
ItemCostLine item property: Unit cost for item.
ItemCustomerIdLine item property: A reference to customer for whom the item was ordered.
ItemCustomerNameLine item property: A reference to customer for whom the item was ordered.
ItemDescriptionLine item property: Description of item.
ItemIdLine item property: Reference to the kind of item.
ItemNameLine item property: Reference to the kind of item.
ItemLineIdIdentification number of the transaction line, used for Updates.
ItemManuallyClosedIndicates if the line item has been manually closed.
ItemOther1Standard QuickBooks Custom Field available for transaction line items.
ItemOther2Standard QuickBooks Custom Field available for transaction line items.
ItemOverrideAccountIdAn account which will override the default account for the line item.
ItemOverrideAccountNameAn account which will override the default account for the line item.
ItemPriceLevelIdLine Item property: Used to specify custom pricing for specific customers.
ItemPriceLevelNameLine Item property: Specify custom pricing for specific customers.
ItemQuantityLine item property: Quantity of item or item group.
ItemRateUnit rate of item.
ItemRatePercentLine item property: A markup or discount percentage.
ItemServiceDateLine item property: Date of service.
ItemTaxCodeIdLine item property: Sales tax information for this item.
ItemTaxCodeNameLine item property: Sales tax information for this item.
ItemUnitOfMeasureUnit of measure describing the Quantity .
PrintItemsInGroupIndicates whether line items will be shown on printed forms.
QBXMLVersionThe version of QBXML used to generate the update aggregate.
QuantityThe quantity of this line item group.
TotalAmountThe total amount of this group of line items.
UnitOfMeasureUnit of measure describing the Quantity .

Method List


The following is the full list of the methods of the class with short descriptions. Click on the links for further details.

ConfigSets or retrieves a configuration setting.
GetGroupUpdateAggregateGenerates a group aggregate for use in another class's Update request.
ParseAggregateParses the aggregate returned from another class's ItemAggregate property.
ResetResets this class to its default state.

Event List


The following is the full list of the events fired by the class with short descriptions. Click on the links for further details.

ErrorInformation about errors during data delivery.

Config Settings


The following is a list of config settings for the class with short descriptions. Click on the links for further details.

BuildInfoInformation about the product's build.
CodePageThe system code page used for Unicode to Multibyte translations.
LicenseInfoInformation about the current license.
MaskSensitiveWhether sensitive data is masked in log messages.
ProcessIdleEventsWhether the class uses its internal event loop to process events when the main thread is idle.
SelectWaitMillisThe length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.
UseInternalSecurityAPITells the class whether or not to use the system security libraries or an internal implementation.

Description Property (LineItemGroups Class)

A string description of the item group specified by GroupName or GroupId .

Syntax

ANSI (Cross Platform)
char* GetDescription();

Unicode (Windows)
LPWSTR GetDescription();
char* inqb_lineitemgroups_getdescription(void* lpObj);
QString GetDescription();

Default Value

""

Remarks

This property will contain the description of the group as returned by QuickBooks.

This property is read-only and not available at design time.

Data Type

String

GroupId Property (LineItemGroups Class)

Reference to a group of line items.

Syntax

ANSI (Cross Platform)
char* GetGroupId();
int SetGroupId(const char* lpszGroupId); Unicode (Windows) LPWSTR GetGroupId();
INT SetGroupId(LPCWSTR lpszGroupId);
char* inqb_lineitemgroups_getgroupid(void* lpObj);
int inqb_lineitemgroups_setgroupid(void* lpObj, const char* lpszGroupId);
QString GetGroupId();
int SetGroupId(QString qsGroupId);

Default Value

""

Remarks

Line item groups represent sets of items that are grouped together.

A line item group is a predefined shortcut within QuickBooks. For example, a "Cheeseburger Meal" might consist of a cheeseburger, an order of french fries, and a soft drink. To include an item group in a transaction one should simply set the value of ItemGroup, and optionally, of ItemQuantity. QuickBooks will automatically expand the group into its constituent items. This will send an ItemGroup instead of a regular Item on for this index.

When an ItemGroup is returned from QuickBooks it contains xml aggregates of all of the items in the group you specified. You may access the group's regular properties (total Amount, Quantity, and Description), but the line items returned are not normally accessible. However, you may parse the returned line items by passing the contents of the Aggregate property to the LineItemGroups class. You may use the LineItemGroups class to view or change the contents of the line items, and then pass the xml aggregate generated by the class back to the Aggregate field of the original\ object to use in an Update transaction.

Data Type

String

GroupName Property (LineItemGroups Class)

Reference to a group of line items.

Syntax

ANSI (Cross Platform)
char* GetGroupName();
int SetGroupName(const char* lpszGroupName); Unicode (Windows) LPWSTR GetGroupName();
INT SetGroupName(LPCWSTR lpszGroupName);
char* inqb_lineitemgroups_getgroupname(void* lpObj);
int inqb_lineitemgroups_setgroupname(void* lpObj, const char* lpszGroupName);
QString GetGroupName();
int SetGroupName(QString qsGroupName);

Default Value

""

Remarks

Line item groups represent sets of items that are grouped together.

A line item group is a predefined shortcut within QuickBooks. For example, a "Cheeseburger Meal" might consist of a cheeseburger, an order of french fries, and a soft drink. To include an item group in a transaction one should simply set the value of ItemGroup, and optionally, of ItemQuantity. QuickBooks will automatically expand the group into its constituent items. This will send an ItemGroup instead of a regular Item on for this index.

When an ItemGroup is returned from QuickBooks it contains xml aggregates of all of the items in the group you specified. You may access the group's regular properties (total Amount, Quantity, and Description), but the line items returned are not normally accessible. However, you may parse the returned line items by passing the contents of the Aggregate property to the LineItemGroups class. You may use the LineItemGroups class to view or change the contents of the line items, and then pass the xml aggregate generated by the class back to the Aggregate field of the original\ object to use in an Update transaction.

Data Type

String

GroupType Property (LineItemGroups Class)

The type of line item group aggregate to create.

Syntax

ANSI (Cross Platform)
int GetGroupType();
int SetGroupType(int iGroupType); Unicode (Windows) INT GetGroupType();
INT SetGroupType(INT iGroupType);

Possible Values

GT_STANDARD_GROUP(0), 
GT_CREDIT_MEMO(1),
GT_ESTIMATE(2),
GT_INVOICE(3),
GT_PURCHASE_ORDER(4),
GT_SALES_ORDER(5),
GT_SALES_RECEIPT(6)
int inqb_lineitemgroups_getgrouptype(void* lpObj);
int inqb_lineitemgroups_setgrouptype(void* lpObj, int iGroupType);
int GetGroupType();
int SetGroupType(int iGroupType);

Default Value

0

Remarks

This property will be automatically filled after a call to ParseAggregate. The following values are permitted:

gtStandardGroup (0) Used for the Bill, CCCharge, CCCredit, Check, VendorCredit, and ItemReceipt classs.
gtCreditMemo (1) Corresponds to the CreditMemo class.
gtEstimate (2) Corresponds to the Estimate class.
gtInvoice (3) Corresponds to the Invoice class.
gtPurchaseOrder (4) Corresponds to the PurchaseOrder class.
gtSalesOrder (5) Corresponds to the SalesOrder class.
gtSalesReceipt (6) Corresponds to the SalesReceipt class.

Data Type

Integer

LineId Property (LineItemGroups Class)

Identification number of the transaction line group, used for Updates.

Syntax

ANSI (Cross Platform)
char* GetLineId();
int SetLineId(const char* lpszLineId); Unicode (Windows) LPWSTR GetLineId();
INT SetLineId(LPCWSTR lpszLineId);
char* inqb_lineitemgroups_getlineid(void* lpObj);
int inqb_lineitemgroups_setlineid(void* lpObj, const char* lpszLineId);
QString GetLineId();
int SetLineId(QString qsLineId);

Default Value

""

Remarks

If you need to add a new transaction line group in a transaction Update request, you can do so by setting the LineId to -1.

Data Type

String

ItemCount Property (LineItemGroups Class)

The number of records in the Item arrays.

Syntax

ANSI (Cross Platform)
int GetItemCount();
int SetItemCount(int iItemCount); Unicode (Windows) INT GetItemCount();
INT SetItemCount(INT iItemCount);
int inqb_lineitemgroups_getitemcount(void* lpObj);
int inqb_lineitemgroups_setitemcount(void* lpObj, int iItemCount);
int GetItemCount();
int SetItemCount(int iItemCount);

Default Value

0

Remarks

This property controls the size of the following arrays:

The array indices start at 0 and end at ItemCount - 1.

This property is not available at design time.

Data Type

Integer

ItemAggregate Property (LineItemGroups Class)

Contains an XML aggregate of the line item.

Syntax

ANSI (Cross Platform)
char* GetItemAggregate(int iItemIndex);
int SetItemAggregate(int iItemIndex, const char* lpszItemAggregate); Unicode (Windows) LPWSTR GetItemAggregate(INT iItemIndex);
INT SetItemAggregate(INT iItemIndex, LPCWSTR lpszItemAggregate);
char* inqb_lineitemgroups_getitemaggregate(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemaggregate(void* lpObj, int itemindex, const char* lpszItemAggregate);
QString GetItemAggregate(int iItemIndex);
int SetItemAggregate(int iItemIndex, QString qsItemAggregate);

Default Value

""

Remarks

Contains an XML aggregate of the line item. If the line item has not been modified since receiving a response from QuickBooks, the exact LineRet aggregate that QuickBooks returned will be contained in this XML aggregate. However, if you have made changes to the this line item's properties the ItemAggregate property will re-generate the line item XML with the new data.

If you set the other line item properties and then query the ItemAggregate, a LineRet aggregate will be generated from the currently set properties.

You may set this property with raw xml. So long as you do not modify any other properties (forcing the line item to regenerate based on new changes), the xml will be sent as-is to the QuickBooks request processor. It is essential that you properly format the XML that you place in this property. When setting this property manually, the class will send exactly what you have set. You must ensure your xml is appropriate for the action you are attempting. For instance, if you are Adding an Invoice, you must ensure the outer tags are "InvoiceLineAdd". If Modifying an Invoice, the outer tags must be "InvoiceLineMod".

If you do not expressly set the ItemAggregate field with your own custom XML, all of this will be taken care of you automatically by the class.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemAmount Property (LineItemGroups Class)

Line item property: the total amount of this item.

Syntax

ANSI (Cross Platform)
char* GetItemAmount(int iItemIndex);
int SetItemAmount(int iItemIndex, const char* lpszItemAmount); Unicode (Windows) LPWSTR GetItemAmount(INT iItemIndex);
INT SetItemAmount(INT iItemIndex, LPCWSTR lpszItemAmount);
char* inqb_lineitemgroups_getitemamount(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemamount(void* lpObj, int itemindex, const char* lpszItemAmount);
QString GetItemAmount(int iItemIndex);
int SetItemAmount(int iItemIndex, QString qsItemAmount);

Default Value

""

Remarks

Line item property: the total amount of this item.

This property represents the total amount of a transaction line. If ItemRate, ItemCost and/or ItemQuantity are specified the ItemAmount will be automatically computed by QuickBooks.

Whether ItemRate or ItemCost is used will depend on the transaction type. ItemRate is available for CreditMemo, Estimate, Invoice, PurchaseOrder, SalesOrder, and SalesReceipt transactions while ItemCost is available for Bill, CCCharge, CCCredit, Check, ItemReceipt, and VendorCredit transactions.

The amount should be formatted as a string in dollars.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemBillableStatus Property (LineItemGroups Class)

Line item property: Billing status of this item.

Syntax

ANSI (Cross Platform)
int GetItemBillableStatus(int iItemIndex);
int SetItemBillableStatus(int iItemIndex, int iItemBillableStatus); Unicode (Windows) INT GetItemBillableStatus(INT iItemIndex);
INT SetItemBillableStatus(INT iItemIndex, INT iItemBillableStatus);

Possible Values

BS_EMPTY(0), 
BS_BILLABLE(1),
BS_NOT_BILLABLE(2),
BS_HAS_BEEN_BILLED(3)
int inqb_lineitemgroups_getitembillablestatus(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitembillablestatus(void* lpObj, int itemindex, int iItemBillableStatus);
int GetItemBillableStatus(int iItemIndex);
int SetItemBillableStatus(int iItemIndex, int iItemBillableStatus);

Default Value

0

Remarks

Line item property: Billing status of this item.

The billing status of this line item. If the billing status is empty (that is, if no billing status appears in QuickBooks), then no ItemBillableStatus value will be returned.

Values:

  • bsEmpty (0)
  • bsBillable (1)
  • bsNotBillable (2)
  • bsHasBeenBilled (3)

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

Integer

ItemClassId Property (LineItemGroups Class)

Line item property: Reference to the class of the item.

Syntax

ANSI (Cross Platform)
char* GetItemClassId(int iItemIndex);
int SetItemClassId(int iItemIndex, const char* lpszItemClassId); Unicode (Windows) LPWSTR GetItemClassId(INT iItemIndex);
INT SetItemClassId(INT iItemIndex, LPCWSTR lpszItemClassId);
char* inqb_lineitemgroups_getitemclassid(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemclassid(void* lpObj, int itemindex, const char* lpszItemClassId);
QString GetItemClassId(int iItemIndex);
int SetItemClassId(int iItemIndex, QString qsItemClassId);

Default Value

""

Remarks

Line item property: Reference to the class of the item.

A reference to the class of this item.

Id/Name Reference Properties

This property is used to reference an object that is already done within QuickBooks. This may be done with its Id (this property) or its full Name, for which a corresponding property is defined.

Using the Id is recommended when feasible, as the Id is guaranteed to never change once defined.

Setting the value of this property will set the corresponding Name property to an empty string.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemClassName Property (LineItemGroups Class)

Line item property: Reference to the class of the item.

Syntax

ANSI (Cross Platform)
char* GetItemClassName(int iItemIndex);
int SetItemClassName(int iItemIndex, const char* lpszItemClassName); Unicode (Windows) LPWSTR GetItemClassName(INT iItemIndex);
INT SetItemClassName(INT iItemIndex, LPCWSTR lpszItemClassName);
char* inqb_lineitemgroups_getitemclassname(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemclassname(void* lpObj, int itemindex, const char* lpszItemClassName);
QString GetItemClassName(int iItemIndex);
int SetItemClassName(int iItemIndex, QString qsItemClassName);

Default Value

""

Remarks

Line item property: Reference to the class of the item.

Name/Id Reference Properties

This property is used to reference an object that is already done within QuickBooks. This may be done with its full Name (this property) or its Id, for which a corresponding property is defined. If Name is used, it must contain the full name of the object referred to, as generated by QuickBooks. For hierarchically defined objects, such as Customers, this includes the names of parent objects, and the full name can be determined by reading the FullName special field.

Setting the value of this property will set the corresponding Id property to an empty string.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemCost Property (LineItemGroups Class)

Line item property: Unit cost for item.

Syntax

ANSI (Cross Platform)
char* GetItemCost(int iItemIndex);
int SetItemCost(int iItemIndex, const char* lpszItemCost); Unicode (Windows) LPWSTR GetItemCost(INT iItemIndex);
INT SetItemCost(INT iItemIndex, LPCWSTR lpszItemCost);
char* inqb_lineitemgroups_getitemcost(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemcost(void* lpObj, int itemindex, const char* lpszItemCost);
QString GetItemCost(int iItemIndex);
int SetItemCost(int iItemIndex, QString qsItemCost);

Default Value

""

Remarks

Line item property: Unit cost for item.

The unit cost for this item.

If ItemAmount is specified, then ItemCost will be calculated automatically and should not be specified.

The amount should be formatted as a string in dollars.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemCustomerId Property (LineItemGroups Class)

Line item property: A reference to customer for whom the item was ordered.

Syntax

ANSI (Cross Platform)
char* GetItemCustomerId(int iItemIndex);
int SetItemCustomerId(int iItemIndex, const char* lpszItemCustomerId); Unicode (Windows) LPWSTR GetItemCustomerId(INT iItemIndex);
INT SetItemCustomerId(INT iItemIndex, LPCWSTR lpszItemCustomerId);
char* inqb_lineitemgroups_getitemcustomerid(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemcustomerid(void* lpObj, int itemindex, const char* lpszItemCustomerId);
QString GetItemCustomerId(int iItemIndex);
int SetItemCustomerId(int iItemIndex, QString qsItemCustomerId);

Default Value

""

Remarks

Line item property: A reference to customer for whom the item was ordered.

A reference to a Customer for whom this item was ordered.

If this property is set, the expense will be set as billable to the Customer referenced.

Id/Name Reference Properties

This property is used to reference an object that is already done within QuickBooks. This may be done with its Id (this property) or its full Name, for which a corresponding property is defined.

Using the Id is recommended when feasible, as the Id is guaranteed to never change once defined.

Setting the value of this property will set the corresponding Name property to an empty string.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemCustomerName Property (LineItemGroups Class)

Line item property: A reference to customer for whom the item was ordered.

Syntax

ANSI (Cross Platform)
char* GetItemCustomerName(int iItemIndex);
int SetItemCustomerName(int iItemIndex, const char* lpszItemCustomerName); Unicode (Windows) LPWSTR GetItemCustomerName(INT iItemIndex);
INT SetItemCustomerName(INT iItemIndex, LPCWSTR lpszItemCustomerName);
char* inqb_lineitemgroups_getitemcustomername(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemcustomername(void* lpObj, int itemindex, const char* lpszItemCustomerName);
QString GetItemCustomerName(int iItemIndex);
int SetItemCustomerName(int iItemIndex, QString qsItemCustomerName);

Default Value

""

Remarks

Line item property: A reference to customer for whom the item was ordered.

A reference to a Customer for whom this item was ordered.

If this property is set, the expense will be set as billable to the Customer referenced.

Name/Id Reference Properties

This property is used to reference an object that is already done within QuickBooks. This may be done with its full Name (this property) or its Id, for which a corresponding property is defined. If Name is used, it must contain the full name of the object referred to, as generated by QuickBooks. For hierarchically defined objects, such as Customers, this includes the names of parent objects, and the full name can be determined by reading the FullName special field.

Setting the value of this property will set the corresponding Id property to an empty string.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemDescription Property (LineItemGroups Class)

Line item property: Description of item.

Syntax

ANSI (Cross Platform)
char* GetItemDescription(int iItemIndex);
int SetItemDescription(int iItemIndex, const char* lpszItemDescription); Unicode (Windows) LPWSTR GetItemDescription(INT iItemIndex);
INT SetItemDescription(INT iItemIndex, LPCWSTR lpszItemDescription);
char* inqb_lineitemgroups_getitemdescription(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemdescription(void* lpObj, int itemindex, const char* lpszItemDescription);
QString GetItemDescription(int iItemIndex);
int SetItemDescription(int iItemIndex, QString qsItemDescription);

Default Value

""

Remarks

Line item property: Description of item.

A string description of the Item specified by ItemName or ItemId.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemId Property (LineItemGroups Class)

Line item property: Reference to the kind of item.

Syntax

ANSI (Cross Platform)
char* GetItemId(int iItemIndex);
int SetItemId(int iItemIndex, const char* lpszItemId); Unicode (Windows) LPWSTR GetItemId(INT iItemIndex);
INT SetItemId(INT iItemIndex, LPCWSTR lpszItemId);
char* inqb_lineitemgroups_getitemid(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemid(void* lpObj, int itemindex, const char* lpszItemId);
QString GetItemId(int iItemIndex);
int SetItemId(int iItemIndex, QString qsItemId);

Default Value

""

Remarks

Line item property: Reference to the kind of item.

Line items represent goods or services bought in a QuickBooks transaction.

Each line item is represented by a number of properties, each prefixed by Item (see the list of properties for individual classs for details). Properties such as ItemQuantity and ItemDescription are always present; some properties are found in only certain types of transactions.

Item is a reference to a kind of item, predefined within QuickBooks. Generally items defined within QuickBooks have default values for ItemDescription, etc., and if only Item is set when adding a record to QuickBooks, the other properties will be set automatically.

This class is used to create a single item. However, any InQB class may be set with an unlimited number of these items. For example:

Invoice.ItemCount = 3 LineItems.ItemName = "Wingnut" LineItems.Quantity = 8 Invoice.ItemAggregate[0] = LineItems.GetAggregate() LineItems.ItemName = "Shovel" LineItems.Quantity = 1 Invoice.ItemAggregate[1] = LineItems.GetAggregate() LineItems.ItemName = "Mower blade" LineItems.Quantity = 1 Invoice.ItemAggregate[2] = LineItems.GetAggregate()

Items may also be grouped into ItemGroups, using the LineItemGroups class.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemName Property (LineItemGroups Class)

Line item property: Reference to the kind of item.

Syntax

ANSI (Cross Platform)
char* GetItemName(int iItemIndex);
int SetItemName(int iItemIndex, const char* lpszItemName); Unicode (Windows) LPWSTR GetItemName(INT iItemIndex);
INT SetItemName(INT iItemIndex, LPCWSTR lpszItemName);
char* inqb_lineitemgroups_getitemname(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemname(void* lpObj, int itemindex, const char* lpszItemName);
QString GetItemName(int iItemIndex);
int SetItemName(int iItemIndex, QString qsItemName);

Default Value

""

Remarks

Line item property: Reference to the kind of item.

Line items represent goods or services bought in a QuickBooks transaction.

Each line item is represented by a number of properties, each prefixed by Item (see the list of properties for individual classs for details). Properties such as ItemQuantity and ItemDescription are always present; some properties are found in only certain types of transactions.

Item is a reference to a kind of item, predefined within QuickBooks. Generally items defined within QuickBooks have default values for ItemDescription, etc., and if only Item is set when adding a record to QuickBooks, the other properties will be set automatically.

This class is used to create a single item. However, any InQB class may be set with an unlimited number of these items. For example:

Invoice.ItemCount = 3 LineItems.ItemName = "Wingnut" LineItems.Quantity = 8 Invoice.ItemAggregate[0] = LineItems.GetAggregate() LineItems.ItemName = "Shovel" LineItems.Quantity = 1 Invoice.ItemAggregate[1] = LineItems.GetAggregate() LineItems.ItemName = "Mower blade" LineItems.Quantity = 1 Invoice.ItemAggregate[2] = LineItems.GetAggregate()

Items may also be grouped into ItemGroups, using the LineItemGroups class.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemLineId Property (LineItemGroups Class)

Identification number of the transaction line, used for Updates.

Syntax

ANSI (Cross Platform)
char* GetItemLineId(int iItemIndex);
int SetItemLineId(int iItemIndex, const char* lpszItemLineId); Unicode (Windows) LPWSTR GetItemLineId(INT iItemIndex);
INT SetItemLineId(INT iItemIndex, LPCWSTR lpszItemLineId);
char* inqb_lineitemgroups_getitemlineid(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemlineid(void* lpObj, int itemindex, const char* lpszItemLineId);
QString GetItemLineId(int iItemIndex);
int SetItemLineId(int iItemIndex, QString qsItemLineId);

Default Value

""

Remarks

Identification number of the transaction line, used for Updates.

If you need to add a new transaction line in a transaction Update request, you can do so by setting the ItemLineId to -1.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemManuallyClosed Property (LineItemGroups Class)

Indicates if the line item has been manually closed.

Syntax

ANSI (Cross Platform)
int GetItemManuallyClosed(int iItemIndex);
int SetItemManuallyClosed(int iItemIndex, int iItemManuallyClosed); Unicode (Windows) INT GetItemManuallyClosed(INT iItemIndex);
INT SetItemManuallyClosed(INT iItemIndex, INT iItemManuallyClosed);

Possible Values

MC_NOT_SET(0), 
MC_MANUALLY_CLOSED(1),
MC_NOT_MANUALLY_CLOSED(2)
int inqb_lineitemgroups_getitemmanuallyclosed(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemmanuallyclosed(void* lpObj, int itemindex, int iItemManuallyClosed);
int GetItemManuallyClosed(int iItemIndex);
int SetItemManuallyClosed(int iItemIndex, int iItemManuallyClosed);

Default Value

0

Remarks

Indicates if the line item has been manually closed.

If ItemManuallyClosed is mcManuallyClosed, the purchase order line has been closed, even if this item has not been received or its sale canceled. If all the purchase order lines are marked as closed, the purchase order itself is marked as closed as well. You cannot change ItemManuallyClosed to mcNotManuallyClosed after the purchase order line has been fully received. If set to mcNotSet the field is not sent in the request.

Only applicable to Update transactions.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

Integer

ItemOther1 Property (LineItemGroups Class)

Standard QuickBooks Custom Field available for transaction line items.

Syntax

ANSI (Cross Platform)
char* GetItemOther1(int iItemIndex);
int SetItemOther1(int iItemIndex, const char* lpszItemOther1); Unicode (Windows) LPWSTR GetItemOther1(INT iItemIndex);
INT SetItemOther1(INT iItemIndex, LPCWSTR lpszItemOther1);
char* inqb_lineitemgroups_getitemother1(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemother1(void* lpObj, int itemindex, const char* lpszItemOther1);
QString GetItemOther1(int iItemIndex);
int SetItemOther1(int iItemIndex, QString qsItemOther1);

Default Value

""

Remarks

Standard QuickBooks Custom Field available for transaction line items.

The ItemOther1 and ItemOther2 custom fields are available for immediate use: you don't need to enable these in the transaction template to be able to access them via SDK. (However, those ItemOther1 and ItemOther2 fields and their values are viewable and printable in QuickBooks only if the transaction template has these enabled!). QBXMLVersion 6.0 or higher is required to use this property.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemOther2 Property (LineItemGroups Class)

Standard QuickBooks Custom Field available for transaction line items.

Syntax

ANSI (Cross Platform)
char* GetItemOther2(int iItemIndex);
int SetItemOther2(int iItemIndex, const char* lpszItemOther2); Unicode (Windows) LPWSTR GetItemOther2(INT iItemIndex);
INT SetItemOther2(INT iItemIndex, LPCWSTR lpszItemOther2);
char* inqb_lineitemgroups_getitemother2(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemother2(void* lpObj, int itemindex, const char* lpszItemOther2);
QString GetItemOther2(int iItemIndex);
int SetItemOther2(int iItemIndex, QString qsItemOther2);

Default Value

""

Remarks

Standard QuickBooks Custom Field available for transaction line items.

The ItemOther1 and ItemOther2 custom fields are available for immediate use: you don't need to enable these in the transaction template to be able to access them via SDK. (However, those ItemOther1 and ItemOther2 fields and their values are viewable and printable in QuickBooks only if the transaction template has these enabled!). QBXMLVersion 6.0 or higher is required to use this property.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemOverrideAccountId Property (LineItemGroups Class)

An account which will override the default account for the line item.

Syntax

ANSI (Cross Platform)
char* GetItemOverrideAccountId(int iItemIndex);
int SetItemOverrideAccountId(int iItemIndex, const char* lpszItemOverrideAccountId); Unicode (Windows) LPWSTR GetItemOverrideAccountId(INT iItemIndex);
INT SetItemOverrideAccountId(INT iItemIndex, LPCWSTR lpszItemOverrideAccountId);
char* inqb_lineitemgroups_getitemoverrideaccountid(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemoverrideaccountid(void* lpObj, int itemindex, const char* lpszItemOverrideAccountId);
QString GetItemOverrideAccountId(int iItemIndex);
int SetItemOverrideAccountId(int iItemIndex, QString qsItemOverrideAccountId);

Default Value

""

Remarks

An account which will override the default account for the line item. QBXMLVersion must be 2.0 or higher to use this configuration setting.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemOverrideAccountName Property (LineItemGroups Class)

An account which will override the default account for the line item.

Syntax

ANSI (Cross Platform)
char* GetItemOverrideAccountName(int iItemIndex);
int SetItemOverrideAccountName(int iItemIndex, const char* lpszItemOverrideAccountName); Unicode (Windows) LPWSTR GetItemOverrideAccountName(INT iItemIndex);
INT SetItemOverrideAccountName(INT iItemIndex, LPCWSTR lpszItemOverrideAccountName);
char* inqb_lineitemgroups_getitemoverrideaccountname(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemoverrideaccountname(void* lpObj, int itemindex, const char* lpszItemOverrideAccountName);
QString GetItemOverrideAccountName(int iItemIndex);
int SetItemOverrideAccountName(int iItemIndex, QString qsItemOverrideAccountName);

Default Value

""

Remarks

An account which will override the default account for the line item. QBXMLVersion must be 2.0 or higher to use this configuration setting.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemPriceLevelId Property (LineItemGroups Class)

Line Item property: Used to specify custom pricing for specific customers.

Syntax

ANSI (Cross Platform)
char* GetItemPriceLevelId(int iItemIndex);
int SetItemPriceLevelId(int iItemIndex, const char* lpszItemPriceLevelId); Unicode (Windows) LPWSTR GetItemPriceLevelId(INT iItemIndex);
INT SetItemPriceLevelId(INT iItemIndex, LPCWSTR lpszItemPriceLevelId);
char* inqb_lineitemgroups_getitempricelevelid(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitempricelevelid(void* lpObj, int itemindex, const char* lpszItemPriceLevelId);
QString GetItemPriceLevelId(int iItemIndex);
int SetItemPriceLevelId(int iItemIndex, QString qsItemPriceLevelId);

Default Value

""

Remarks

Line Item property: Used to specify custom pricing for specific customers.

Id for the PriceLevel selected for this transaction.

If ItemPriceLevelId and/or ItemPriceLevelName are specified, then ItemAmount will be calculated automatically and should not be specified.

Note that ItemPriceLevelId and ItemPriceLevelName, OR ItemRate OR ItemRatePercent may be specified. ItemPriceLevelId and ItemPriceLevelName are ONLY available for QBXMLVersions 4.0 and above.

You can use price levels to specify custom pricing for specific customers. Once you create a price level for a customer, QuickBooks will automatically use the custom price in new invoices, sales receipts, sales orders or credit memos for that customer. You can override this automatic feature, however, when you create the invoices, sales receipts, etc.)

The user can now specify a price level on line items in the following supported sales transactions: invoices, sales receipts, credit memos, and sales orders.

Notice that the response data for the affected sales transaction does not list the price level that was used. The response simply lists the ItemRate, which was set using the price level.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemPriceLevelName Property (LineItemGroups Class)

Line Item property: Specify custom pricing for specific customers.

Syntax

ANSI (Cross Platform)
char* GetItemPriceLevelName(int iItemIndex);
int SetItemPriceLevelName(int iItemIndex, const char* lpszItemPriceLevelName); Unicode (Windows) LPWSTR GetItemPriceLevelName(INT iItemIndex);
INT SetItemPriceLevelName(INT iItemIndex, LPCWSTR lpszItemPriceLevelName);
char* inqb_lineitemgroups_getitempricelevelname(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitempricelevelname(void* lpObj, int itemindex, const char* lpszItemPriceLevelName);
QString GetItemPriceLevelName(int iItemIndex);
int SetItemPriceLevelName(int iItemIndex, QString qsItemPriceLevelName);

Default Value

""

Remarks

Line Item property: Specify custom pricing for specific customers.

Id for the PriceLevel selected for this transaction.

If ItemPriceLevelId and/or ItemPriceLevelName are specified, then ItemAmount will be calculated automatically and should not be specified.

Note that ItemPriceLevelId and ItemPriceLevelName, OR ItemRate OR ItemRatePercent may be specified. ItemPriceLevelId and ItemPriceLevelName are ONLY available for QBXMLVersions 4.0 and above.

You can use price levels to specify custom pricing for specific customers. Once you create a price level for a customer, QuickBooks will automatically use the custom price in new invoices, sales receipts, sales orders or credit memos for that customer. You can override this automatic feature, however, when you create the invoices, sales receipts, etc.)

The user can now specify a price level on line items in the following supported sales transactions: invoices, sales receipts, credit memos, and sales orders.

Notice that the response data for the affected sales transaction does not list the price level that was used. The response simply lists the ItemRate, which was set using the price level.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemQuantity Property (LineItemGroups Class)

Line item property: Quantity of item or item group.

Syntax

ANSI (Cross Platform)
char* GetItemQuantity(int iItemIndex);
int SetItemQuantity(int iItemIndex, const char* lpszItemQuantity); Unicode (Windows) LPWSTR GetItemQuantity(INT iItemIndex);
INT SetItemQuantity(INT iItemIndex, LPCWSTR lpszItemQuantity);
char* inqb_lineitemgroups_getitemquantity(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemquantity(void* lpObj, int itemindex, const char* lpszItemQuantity);
QString GetItemQuantity(int iItemIndex);
int SetItemQuantity(int iItemIndex, QString qsItemQuantity);

Default Value

""

Remarks

Line item property: Quantity of item or item group.

The quantity of the Item specified in this line.

If ItemQuantity and only one of ItemCost, ItemRate, or ItemAmount are specified, QuickBooks will automatically calculate the other.

This property is a String type in order to allow setting fractional quantities. Setting this property with non-numeric data will cause an error. Correct usage of this property is shown below:

class.Quantity = "3.5"

Leave this property blank and no quantity will be sent to QuickBooks.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemRate Property (LineItemGroups Class)

Unit rate of item.

Syntax

ANSI (Cross Platform)
char* GetItemRate(int iItemIndex);
int SetItemRate(int iItemIndex, const char* lpszItemRate); Unicode (Windows) LPWSTR GetItemRate(INT iItemIndex);
INT SetItemRate(INT iItemIndex, LPCWSTR lpszItemRate);
char* inqb_lineitemgroups_getitemrate(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemrate(void* lpObj, int itemindex, const char* lpszItemRate);
QString GetItemRate(int iItemIndex);
int SetItemRate(int iItemIndex, QString qsItemRate);

Default Value

""

Remarks

Unit rate of item.

The unit rate charged for this item.

If ItemAmount is specified, then ItemRate will be calculated automatically and should not be specified.

The amount should be formatted as a string in dollars.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemRatePercent Property (LineItemGroups Class)

Line item property: A markup or discount percentage.

Syntax

ANSI (Cross Platform)
char* GetItemRatePercent(int iItemIndex);
int SetItemRatePercent(int iItemIndex, const char* lpszItemRatePercent); Unicode (Windows) LPWSTR GetItemRatePercent(INT iItemIndex);
INT SetItemRatePercent(INT iItemIndex, LPCWSTR lpszItemRatePercent);
char* inqb_lineitemgroups_getitemratepercent(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemratepercent(void* lpObj, int itemindex, const char* lpszItemRatePercent);
QString GetItemRatePercent(int iItemIndex);
int SetItemRatePercent(int iItemIndex, QString qsItemRatePercent);

Default Value

""

Remarks

Line item property: A markup or discount percentage.

If ItemRatePercent is specified instead of ItemRate, then this line item represents a percentage markup or discount, to be applied to the previous Item or Item group.

ItemRatePercent should be formatted as a positive or negative integer; a positive value indicates a markup.

Only one of ItemRatePercent and ItemRate may be specified. If ItemRatePercent is set, then ItemRate will be set to its default.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemServiceDate Property (LineItemGroups Class)

Line item property: Date of service.

Syntax

ANSI (Cross Platform)
char* GetItemServiceDate(int iItemIndex);
int SetItemServiceDate(int iItemIndex, const char* lpszItemServiceDate); Unicode (Windows) LPWSTR GetItemServiceDate(INT iItemIndex);
INT SetItemServiceDate(INT iItemIndex, LPCWSTR lpszItemServiceDate);
char* inqb_lineitemgroups_getitemservicedate(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemservicedate(void* lpObj, int itemindex, const char* lpszItemServiceDate);
QString GetItemServiceDate(int iItemIndex);
int SetItemServiceDate(int iItemIndex, QString qsItemServiceDate);

Default Value

""

Remarks

Line item property: Date of service.

For Items that represent a service, ItemServiceDate refers to the date of service. ItemServiceDate is only applicable for the CreditMemo, Invoice, PurchaseOrder, and SalesReceipt classs.

The standard formatting for dates is YYYY-MM-DD; i.e., September 2, 2002 is formatted as 2002-09-02. When getting the value of a date property, the date will always be in this format.

When setting the value of a date property, the formats MM-DD-YY, MM-DD-YYYY, MM/DD/YY, and MM/DD/YYYY are also acceptable. Dates in these formats will be automatically parsed and stored in YYYY-MM-DD format.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemTaxCodeId Property (LineItemGroups Class)

Line item property: Sales tax information for this item.

Syntax

ANSI (Cross Platform)
char* GetItemTaxCodeId(int iItemIndex);
int SetItemTaxCodeId(int iItemIndex, const char* lpszItemTaxCodeId); Unicode (Windows) LPWSTR GetItemTaxCodeId(INT iItemIndex);
INT SetItemTaxCodeId(INT iItemIndex, LPCWSTR lpszItemTaxCodeId);
char* inqb_lineitemgroups_getitemtaxcodeid(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemtaxcodeid(void* lpObj, int itemindex, const char* lpszItemTaxCodeId);
QString GetItemTaxCodeId(int iItemIndex);
int SetItemTaxCodeId(int iItemIndex, QString qsItemTaxCodeId);

Default Value

""

Remarks

Line item property: Sales tax information for this item.

This is a reference to a sales tax code predefined within QuickBooks.

By default, two standard TaxCodes exist: "TAX", or Taxable Sales, and "NON", or Non-Taxable Sales. The QuickBooks user may also define custom tax codes.

Id/Name Reference Properties

This property is used to reference an object that is already done within QuickBooks. This may be done with its Id (this property) or its full Name, for which a corresponding property is defined.

Using the Id is recommended when feasible, as the Id is guaranteed to never change once defined.

Setting the value of this property will set the corresponding Name property to an empty string.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemTaxCodeName Property (LineItemGroups Class)

Line item property: Sales tax information for this item.

Syntax

ANSI (Cross Platform)
char* GetItemTaxCodeName(int iItemIndex);
int SetItemTaxCodeName(int iItemIndex, const char* lpszItemTaxCodeName); Unicode (Windows) LPWSTR GetItemTaxCodeName(INT iItemIndex);
INT SetItemTaxCodeName(INT iItemIndex, LPCWSTR lpszItemTaxCodeName);
char* inqb_lineitemgroups_getitemtaxcodename(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemtaxcodename(void* lpObj, int itemindex, const char* lpszItemTaxCodeName);
QString GetItemTaxCodeName(int iItemIndex);
int SetItemTaxCodeName(int iItemIndex, QString qsItemTaxCodeName);

Default Value

""

Remarks

Line item property: Sales tax information for this item.

This is a reference to a sales tax code predefined within QuickBooks.

By default, two standard TaxCodes exist: "TAX", or Taxable Sales, and "NON", or Non-Taxable Sales. The QuickBooks user may also define custom tax codes.

Name/Id Reference Properties

This property is used to reference an object that is already done within QuickBooks. This may be done with its full Name (this property) or its Id, for which a corresponding property is defined. If Name is used, it must contain the full name of the object referred to, as generated by QuickBooks. For hierarchically defined objects, such as Customers, this includes the names of parent objects, and the full name can be determined by reading the FullName special field.

Setting the value of this property will set the corresponding Id property to an empty string.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

ItemUnitOfMeasure Property (LineItemGroups Class)

Unit of measure describing the Quantity .

Syntax

ANSI (Cross Platform)
char* GetItemUnitOfMeasure(int iItemIndex);
int SetItemUnitOfMeasure(int iItemIndex, const char* lpszItemUnitOfMeasure); Unicode (Windows) LPWSTR GetItemUnitOfMeasure(INT iItemIndex);
INT SetItemUnitOfMeasure(INT iItemIndex, LPCWSTR lpszItemUnitOfMeasure);
char* inqb_lineitemgroups_getitemunitofmeasure(void* lpObj, int itemindex);
int inqb_lineitemgroups_setitemunitofmeasure(void* lpObj, int itemindex, const char* lpszItemUnitOfMeasure);
QString GetItemUnitOfMeasure(int iItemIndex);
int SetItemUnitOfMeasure(int iItemIndex, QString qsItemUnitOfMeasure);

Default Value

""

Remarks

Unit of measure describing the ItemQuantity.

In a transaction line item, the name of the unit of measure selected from within the item's available units. If the company file is enabled only for single unit of measure per item, this must be the base unit!

This property is only available for QBXMLVersion 7.0 and higher.

The ItemIndex parameter specifies the index of the item in the array. The size of the array is controlled by the ItemCount property.

This property is not available at design time.

Data Type

String

PrintItemsInGroup Property (LineItemGroups Class)

Indicates whether line items will be shown on printed forms.

Syntax

ANSI (Cross Platform)
int GetPrintItemsInGroup();

Unicode (Windows)
BOOL GetPrintItemsInGroup();
int inqb_lineitemgroups_getprintitemsingroup(void* lpObj);
bool GetPrintItemsInGroup();

Default Value

FALSE

Remarks

If true, a list of this group's individual items their amounts will appear on printed forms.

This property is read-only and not available at design time.

Data Type

Boolean

QBXMLVersion Property (LineItemGroups Class)

The version of QBXML used to generate the update aggregate.

Syntax

ANSI (Cross Platform)
char* GetQBXMLVersion();
int SetQBXMLVersion(const char* lpszQBXMLVersion); Unicode (Windows) LPWSTR GetQBXMLVersion();
INT SetQBXMLVersion(LPCWSTR lpszQBXMLVersion);
char* inqb_lineitemgroups_getqbxmlversion(void* lpObj);
int inqb_lineitemgroups_setqbxmlversion(void* lpObj, const char* lpszQBXMLVersion);
QString GetQBXMLVersion();
int SetQBXMLVersion(QString qsQBXMLVersion);

Default Value

"3.0"

Remarks

This should match the QBXMLVersion of the class you're generating a group line update aggregate for.

This property is not available at design time.

Data Type

String

Quantity Property (LineItemGroups Class)

The quantity of this line item group.

Syntax

ANSI (Cross Platform)
char* GetQuantity();
int SetQuantity(const char* lpszQuantity); Unicode (Windows) LPWSTR GetQuantity();
INT SetQuantity(LPCWSTR lpszQuantity);
char* inqb_lineitemgroups_getquantity(void* lpObj);
int inqb_lineitemgroups_setquantity(void* lpObj, const char* lpszQuantity);
QString GetQuantity();
int SetQuantity(QString qsQuantity);

Default Value

""

Remarks

This property is a String type in order to allow setting fractional quantities. Setting this property with non-numeric data will cause an error. Correct usage of this property is shown below:

class.Quantity = "3"

Leave this property blank and no quantity will be sent to QuickBooks.

Data Type

String

TotalAmount Property (LineItemGroups Class)

The total amount of this group of line items.

Syntax

ANSI (Cross Platform)
char* GetTotalAmount();

Unicode (Windows)
LPWSTR GetTotalAmount();
char* inqb_lineitemgroups_gettotalamount(void* lpObj);
QString GetTotalAmount();

Default Value

""

Remarks

This property represents the total amount of all transaction lines in the group. This amount will be automatically computed by QuickBooks.

The amount should be formatted as a string in dollars.

This property is read-only and not available at design time.

Data Type

String

UnitOfMeasure Property (LineItemGroups Class)

Unit of measure describing the Quantity .

Syntax

ANSI (Cross Platform)
char* GetUnitOfMeasure();
int SetUnitOfMeasure(const char* lpszUnitOfMeasure); Unicode (Windows) LPWSTR GetUnitOfMeasure();
INT SetUnitOfMeasure(LPCWSTR lpszUnitOfMeasure);
char* inqb_lineitemgroups_getunitofmeasure(void* lpObj);
int inqb_lineitemgroups_setunitofmeasure(void* lpObj, const char* lpszUnitOfMeasure);
QString GetUnitOfMeasure();
int SetUnitOfMeasure(QString qsUnitOfMeasure);

Default Value

""

Remarks

In a transaction line item, the name of the unit of measure selected from within the item's available units. If the company file is enabled only for single unit of measure per item, this must be the base unit!

This property is only available for QBXMLVersion 7.0 and higher.

Data Type

String

Config Method (LineItemGroups Class)

Sets or retrieves a configuration setting.

Syntax

ANSI (Cross Platform)
char* Config(const char* lpszConfigurationString);

Unicode (Windows)
LPWSTR Config(LPCWSTR lpszConfigurationString);
char* inqb_lineitemgroups_config(void* lpObj, const char* lpszConfigurationString);
QString Config(const QString& qsConfigurationString);

Remarks

Config is a generic method available in every class. It is used to set and retrieve configuration settings for the class.

These settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

To set a configuration setting named PROPERTY, you must call Config("PROPERTY=VALUE"), where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).

To read (query) the value of a configuration setting, you must call Config("PROPERTY"). The value will be returned as a string.

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its 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.

GetGroupUpdateAggregate Method (LineItemGroups Class)

Generates a group aggregate for use in another class's Update request.

Syntax

ANSI (Cross Platform)
char* GetGroupUpdateAggregate();

Unicode (Windows)
LPWSTR GetGroupUpdateAggregate();
char* inqb_lineitemgroups_getgroupupdateaggregate(void* lpObj);
QString GetGroupUpdateAggregate();

Remarks

There is not exposed a way to directly edit the contents of a line item group when submitting an Update request with a class from this package. You can change the Quantity, but you cannot change the line items contained inside the group line. The LineItemGroups class is used to parse a line item group aggregate. You may then make changes to the individual line items, and then call the GetGroupUpdateAggregate to return an xml aggregate containing your changes. This is then set to the Aggregate property of the line you wish to modify in your Update.

For instance, the following code changes the BillableStatus of all line items and line item groups in the Bill retrieved from QuickBooks.

Bill.Get("123456"); for (int i = 0; i < Bill1.LineItems.Count; i++) { if (!Bill.LineItems[i].GroupName.Equals("")) { // this is a group line LineItemGroups.GroupType = gtBill; LineItemGroups.ParseAggregate(Bill.LineItems[0].Aggregate); for (int j = 0; j < LineItemGroups.LineItems.Count) { LineItemGroups.LineItems[j].BillableStatus = bsHasBeenBilled; } LineItemGroups.QBXMLVersion = Bill.QBXMLVersion; // so that the proper fields are included in the update aggregate. Bill1.LineItems[i].Aggregate = LineItemGroups.GetGroupUpdateAggregate(); } else { // regular line item Bill.LineItems[i].BillableStatus = bsHasBeenBilled; } } Bill.Update();

Error Handling (C++)

This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its 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.

ParseAggregate Method (LineItemGroups Class)

Parses the aggregate returned from another class's ItemAggregate property.

Syntax

ANSI (Cross Platform)
int ParseAggregate(const char* lpszAggregate);

Unicode (Windows)
INT ParseAggregate(LPCWSTR lpszAggregate);
int inqb_lineitemgroups_parseaggregate(void* lpObj, const char* lpszAggregate);
int ParseAggregate(const QString& qsAggregate);

Remarks

This method takes the XML aggregate returned from any class's ItemAggregate property, and then fills all the properties of this class. For example:

Invoice.Add() For (i = 0 to Invoice.ItemCount - 1) LineItems.ParseAggregate(Invoice.ItemAggregate[0]) Debug.Print(LineItems.ItemName & VbTab & LineItems.Quantity & VbTab & LineItems.Amount) Next

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.)

Reset Method (LineItemGroups Class)

Resets this class to its default state.

Syntax

ANSI (Cross Platform)
int Reset();

Unicode (Windows)
INT Reset();
int inqb_lineitemgroups_reset(void* lpObj);
int Reset();

Remarks

This method clears all properties and returns the class to its default state.

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.)

Error Event (LineItemGroups Class)

Information about errors during data delivery.

Syntax

ANSI (Cross Platform)
virtual int FireError(LineItemGroupsErrorEventParams *e);
typedef struct {
int ErrorCode;
const char *Description; int reserved; } LineItemGroupsErrorEventParams;
Unicode (Windows) virtual INT FireError(LineItemGroupsErrorEventParams *e);
typedef struct {
INT ErrorCode;
LPCWSTR Description; INT reserved; } LineItemGroupsErrorEventParams;
#define EID_LINEITEMGROUPS_ERROR 1

virtual INT INQB_CALL FireError(INT &iErrorCode, LPSTR &lpszDescription);
class LineItemGroupsErrorEventParams {
public:
  int ErrorCode();

  const QString &Description();

  int EventRetVal();
  void SetEventRetVal(int iRetVal);
};
// To handle, connect one or more slots to this signal. void Error(LineItemGroupsErrorEventParams *e);
// Or, subclass LineItemGroups and override this emitter function. virtual int FireError(LineItemGroupsErrorEventParams *e) {...}

Remarks

The Error event is fired in case of exceptional conditions during message processing.

ErrorCode contains an error code and Description contains a textual description of the error. For a list of valid error codes and their descriptions, please refer to the Error Codes section.

Config Settings (LineItemGroups Class)

The class accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the class, access to these internal properties is provided through the Config method.

Base Config Settings

BuildInfo:   Information about the product's build.

When queried, this setting will return a string containing information about the product's build.

CodePage:   The system code page used for Unicode to Multibyte translations.

The default code page is Unicode UTF-8 (65001).

The following is a list of valid code page identifiers:

IdentifierName
037IBM EBCDIC - U.S./Canada
437OEM - United States
500IBM EBCDIC - International
708Arabic - ASMO 708
709Arabic - ASMO 449+, BCON V4
710Arabic - Transparent Arabic
720Arabic - Transparent ASMO
737OEM - Greek (formerly 437G)
775OEM - Baltic
850OEM - Multilingual Latin I
852OEM - Latin II
855OEM - Cyrillic (primarily Russian)
857OEM - Turkish
858OEM - Multilingual Latin I + Euro symbol
860OEM - Portuguese
861OEM - Icelandic
862OEM - Hebrew
863OEM - Canadian-French
864OEM - Arabic
865OEM - Nordic
866OEM - Russian
869OEM - Modern Greek
870IBM EBCDIC - Multilingual/ROECE (Latin-2)
874ANSI/OEM - Thai (same as 28605, ISO 8859-15)
875IBM EBCDIC - Modern Greek
932ANSI/OEM - Japanese, Shift-JIS
936ANSI/OEM - Simplified Chinese (PRC, Singapore)
949ANSI/OEM - Korean (Unified Hangul Code)
950ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)
1026IBM EBCDIC - Turkish (Latin-5)
1047IBM EBCDIC - Latin 1/Open System
1140IBM EBCDIC - U.S./Canada (037 + Euro symbol)
1141IBM EBCDIC - Germany (20273 + Euro symbol)
1142IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)
1143IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)
1144IBM EBCDIC - Italy (20280 + Euro symbol)
1145IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)
1146IBM EBCDIC - United Kingdom (20285 + Euro symbol)
1147IBM EBCDIC - France (20297 + Euro symbol)
1148IBM EBCDIC - International (500 + Euro symbol)
1149IBM EBCDIC - Icelandic (20871 + Euro symbol)
1200Unicode UCS-2 Little-Endian (BMP of ISO 10646)
1201Unicode UCS-2 Big-Endian
1250ANSI - Central European
1251ANSI - Cyrillic
1252ANSI - Latin I
1253ANSI - Greek
1254ANSI - Turkish
1255ANSI - Hebrew
1256ANSI - Arabic
1257ANSI - Baltic
1258ANSI/OEM - Vietnamese
1361Korean (Johab)
10000MAC - Roman
10001MAC - Japanese
10002MAC - Traditional Chinese (Big5)
10003MAC - Korean
10004MAC - Arabic
10005MAC - Hebrew
10006MAC - Greek I
10007MAC - Cyrillic
10008MAC - Simplified Chinese (GB 2312)
10010MAC - Romania
10017MAC - Ukraine
10021MAC - Thai
10029MAC - Latin II
10079MAC - Icelandic
10081MAC - Turkish
10082MAC - Croatia
12000Unicode UCS-4 Little-Endian
12001Unicode UCS-4 Big-Endian
20000CNS - Taiwan
20001TCA - Taiwan
20002Eten - Taiwan
20003IBM5550 - Taiwan
20004TeleText - Taiwan
20005Wang - Taiwan
20105IA5 IRV International Alphabet No. 5 (7-bit)
20106IA5 German (7-bit)
20107IA5 Swedish (7-bit)
20108IA5 Norwegian (7-bit)
20127US-ASCII (7-bit)
20261T.61
20269ISO 6937 Non-Spacing Accent
20273IBM EBCDIC - Germany
20277IBM EBCDIC - Denmark/Norway
20278IBM EBCDIC - Finland/Sweden
20280IBM EBCDIC - Italy
20284IBM EBCDIC - Latin America/Spain
20285IBM EBCDIC - United Kingdom
20290IBM EBCDIC - Japanese Katakana Extended
20297IBM EBCDIC - France
20420IBM EBCDIC - Arabic
20423IBM EBCDIC - Greek
20424IBM EBCDIC - Hebrew
20833IBM EBCDIC - Korean Extended
20838IBM EBCDIC - Thai
20866Russian - KOI8-R
20871IBM EBCDIC - Icelandic
20880IBM EBCDIC - Cyrillic (Russian)
20905IBM EBCDIC - Turkish
20924IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)
20932JIS X 0208-1990 & 0121-1990
20936Simplified Chinese (GB2312)
21025IBM EBCDIC - Cyrillic (Serbian, Bulgarian)
21027Extended Alpha Lowercase
21866Ukrainian (KOI8-U)
28591ISO 8859-1 Latin I
28592ISO 8859-2 Central Europe
28593ISO 8859-3 Latin 3
28594ISO 8859-4 Baltic
28595ISO 8859-5 Cyrillic
28596ISO 8859-6 Arabic
28597ISO 8859-7 Greek
28598ISO 8859-8 Hebrew
28599ISO 8859-9 Latin 5
28605ISO 8859-15 Latin 9
29001Europa 3
38598ISO 8859-8 Hebrew
50220ISO 2022 Japanese with no halfwidth Katakana
50221ISO 2022 Japanese with halfwidth Katakana
50222ISO 2022 Japanese JIS X 0201-1989
50225ISO 2022 Korean
50227ISO 2022 Simplified Chinese
50229ISO 2022 Traditional Chinese
50930Japanese (Katakana) Extended
50931US/Canada and Japanese
50933Korean Extended and Korean
50935Simplified Chinese Extended and Simplified Chinese
50936Simplified Chinese
50937US/Canada and Traditional Chinese
50939Japanese (Latin) Extended and Japanese
51932EUC - Japanese
51936EUC - Simplified Chinese
51949EUC - Korean
51950EUC - Traditional Chinese
52936HZ-GB2312 Simplified Chinese
54936Windows XP: GB18030 Simplified Chinese (4 Byte)
57002ISCII Devanagari
57003ISCII Bengali
57004ISCII Tamil
57005ISCII Telugu
57006ISCII Assamese
57007ISCII Oriya
57008ISCII Kannada
57009ISCII Malayalam
57010ISCII Gujarati
57011ISCII Punjabi
65000Unicode UTF-7
65001Unicode UTF-8

The following is a list of valid code page identifiers for Mac OS only:

IdentifierName
1ASCII
2NEXTSTEP
3JapaneseEUC
4UTF8
5ISOLatin1
6Symbol
7NonLossyASCII
8ShiftJIS
9ISOLatin2
10Unicode
11WindowsCP1251
12WindowsCP1252
13WindowsCP1253
14WindowsCP1254
15WindowsCP1250
21ISO2022JP
30MacOSRoman
10UTF16String
0x90000100UTF16BigEndian
0x94000100UTF16LittleEndian
0x8c000100UTF32String
0x98000100UTF32BigEndian
0x9c000100UTF32LittleEndian
65536Proprietary

LicenseInfo:   Information about the current license.

When queried, this setting will return a string containing information about the license this instance of a class is using. It will return the following information:

  • Product: The product the license is for.
  • Product Key: The key the license was generated from.
  • License Source: Where the license was found (e.g., RuntimeLicense, License File).
  • License Type: The type of license installed (e.g., Royalty Free, Single Server).
  • Last Valid Build: The last valid build number for which the license will work.
MaskSensitive:   Whether sensitive data is masked in log messages.

In certain circumstances it may be beneficial to mask sensitive data, like passwords, in log messages. Set this to true to mask sensitive data. The default is true.

This setting only works on these classes: AS3Receiver, AS3Sender, Atom, Client(3DS), FTP, FTPServer, IMAP, OFTPClient, SSHClient, SCP, Server(3DS), Sexec, SFTP, SFTPServer, SSHServer, TCPClient, TCPServer.

ProcessIdleEvents:   Whether the class uses its internal event loop to process events when the main thread is idle.

If set to False, the class will not fire internal idle events. Set this to False to use the class in a background thread on Mac OS. By default, this setting is True.

SelectWaitMillis:   The length of time in milliseconds the class will wait when DoEvents is called if there are no events to process.

If there are no events to process when DoEvents is called, the class will wait for the amount of time specified here before returning. The default value is 20.

UseInternalSecurityAPI:   Tells the class whether or not to use the system security libraries or an internal implementation.

When set to false, the class will use the system security libraries by default to perform cryptographic functions where applicable.

Setting this setting to true tells the class to use the internal implementation instead of using the system security libraries.

On Windows, this setting is set to false by default. On Linux/macOS, this setting is set to true by default.

To use the system security libraries for Linux, OpenSSL support must be enabled. For more information on how to enable OpenSSL, please refer to the OpenSSL Notes section.

Trappable Errors (LineItemGroups Class)

Error Handling (C++)

Call the GetLastErrorCode() method to obtain the last called method's result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. Known error codes are listed below. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.

LineItemGroups Errors

201   A required field was not specified.
421   Update is not supported for this GroupType.
901   Unable to parse aggregate.
902   Invalid GroupType.

Copyright (c) 2023 4D Payments Inc.
QuickBooks Integrator 2022 C++ Edition - Version 22.0 [Build 8594]