This is an example of how to add a new ItemService Item. You can also use the stored procedure "sp_lastinsertid ItemService" immediately after the insert statement to retrieve a recordset that has the ListID of the new service item you just inserted.
INSERT INTO ItemService ("Name", "IsActive", "SalesORPurchaseDesc", "SalesTaxCodeRefListID", "SalesOrPurchasePrice", "SalesOrPurchaseAccountRefListID") VALUES ('Priority Support', TRUE, 'QODBC Priority Support Incident', '20000-999022286', 33.00, '190000-933270541')
Once the statement is executed the following new Service appeared in QuickBooks 2006:
But before you add any new Service Items, you should check the ITEM table first to see if the new Service Item Name is not already used in QuickBooks. The ITEM table is a combined list of all Item tables in QuickBooks: ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, and ItemGroup; with minimum common fields.
When inserting a new ItemService item the Name can't already be, for example, a ItemInventory, ItemNonInventory, ItemOtherCharge, ItemInventoryAssembly, ItemService, ItemFixedAsset, or ItemGroup FullName already. It must be a unquie new ITEM FullName!
To see the item fullnames, you can run the following query in VB Demo:
SELECT ListID, FullName, Description, Type FROM Item
In my case, my Australian QuickBooks 2004 sample file returned the following items:
And like ITEM there's a ENTITY table that's the combined list of all entity tables in QuickBooks: Customers, Employees, Othernames, and Vendors; with minimum common fields.
So when inserting a new Customer name the FullName can't be, for example, a Customer, Employee, Othername, or Vendor already. It must be a unquie new ENTITY FullName in QuickBooks!
|