Knowledgebase: Tutorials
[QODBC-Desktop] How do I create a Purchase Order using an Item Group using QODBC?
Posted by Jack - QODBC Support on 09 March 2016 12:35 PM

An Example of PurchaseOrder Item Groups

Create an ItemGroup with Three Lines

Note: Let's start by creating a new item group example with three lines using QODBC. Note the FQSaveToCache field, set to True except on the last one.

First Line

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 1', 1, 'Test Item Desc', 1, '8000009D-1481800631', 1.0, 1)

 QODBC Support Wizard is used to test QODBC SQL queries only and is not a development tool.


Second Line

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 2', 1, 'Test Item Desc', 1, '670004-1044572237', 2.0, 1)

Third (Last) Line

INSERT INTO "ItemGroupLine" ("Name", "IsActive", "ItemDesc", "IsPrintItemsInGroup", "ItemGroupLineItemRefListID", "ItemGroupLineQuantity", "FQSaveToCache") VALUES ('Test1 W3 Lines 3', 1, 'Test Item Desc', 1, '6D0003-1044572301', 3.0, 0)

Result in QuickBooks

The result looks like this in QuickBooks 2022:


For more about creating ItemGroups, please see: How to create Item Groups using QODBC.

Locate the List ID of the New ItemGroup

To locate the ListID of the new Item Group (or any group), simply do:

SELECT ListID, Name, ItemDesc, IsActive FROM ItemGroup

Invoice the ItemGroup


Note: We can now create PurchaseOrder using the item group by using the ListID:'8000009F-1481791619' and doing one simple QODBC insert statement below.


INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber","PurchaseOrderLineGroupItemGroupRefListID","FQSaveToCache") VALUES ('390000-1039739488', 'Group2', '8000009F-1481791619', 0)

Result in QuickBooks

When we look at the new invoice in QuickBooks 2013 we will see:

Note: Qty, Rate and the Amount are shown as per Qty, Rate and the Amount for the service or stock item


(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please complete the captcha below (we use this to prevent automated submissions).