Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

Buy Support
Incidents

If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:

Click Here
If you can't login and post questions or you are having trouble viewing forum posts:
Click Here
Callback
Support

If you live in USA, UK, Canada, Australia or New Zealand, you can leave us details on your question and request us to call you back and discuss them with you personally  (charges apply).

Click Here
 
Buy Support
Incidents
If you can't find your answer in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us private or confidential information:
Click Here

Forum : purchase order line insert fails with group itemSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Support Forum

 New Topic 
 
 Post Reply 
[1]  
 purchase order line insert fails with group item 
 Author   Message 
  jeff 
  
 Group: Members 
 Posts: 76 
 Joined: 2006-06-03 
 Profile
 Posted : 2006-10-17 12:00:40

The following sql statement fails: Insert into PurchaseOrderLine( TxnID,PurchaseOrderLineGroupItemGroupRefListID) Values ('2B-934382526','1C0000-934380927')

2006-10-16 18:51:26 QODBC Ver:  7.00.00.194 *********************************************************************************************************************
IsAService: False
SQL Statement: Insert into PurchaseOrderLine( TxnID,PurchaseOrderLineGroupItemGroupRefListID) Values ('2B-934382526','1C0000-934380927')
Error parsing complete XML return string (8)
Input XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="5.0"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError" responseData = "includeNone">
        <PurchaseOrderModRq requestID = "1">
            <PurchaseOrderMod>
                <TxnID>2B-934382526</TxnID>
                <EditSequence>1197769306</EditSequence>
                <PurchaseOrderLineMod>
                    <TxnLineID>2D-934382526</TxnLineID>
                </PurchaseOrderLineMod>
                <PurchaseOrderLineMod>
                    <TxnLineID>2E-934382526</TxnLineID>
                </PurchaseOrderLineMod>
                <PurchaseOrderLineMod>
                    <TxnLineID>2F-934382526</TxnLineID>
                </PurchaseOrderLineMod>
                <PurchaseOrderLineMod>
                    <TxnLineID>2594-934382526</TxnLineID>
                </PurchaseOrderLineMod>
                <PurchaseOrderLineMod>
                    <TxnLineID>2599-934382526</TxnLineID>
                </PurchaseOrderLineMod>
                <PurchaseOrderLineMod>
                    <TxnLineID>259C-934382526</TxnLineID>
                </PurchaseOrderLineMod>
                <PurchaseOrderLineMod>
                    <TxnLineID>259F-934382526</TxnLineID>
                </PurchaseOrderLineMod>
                <PurchaseOrderGroupLineMod>
                    <TxnLineID>-1</TxnLineID>
                    <ItemGroupRef>
                        <ListID>1C0000-934380927</ListID>
                    </ItemGroupRef>
                </PurchaseOrderGroupLineMod>
            </PurchaseOrderMod>
        </PurchaseOrderModRq>
    </QBXMLMsgsRq>
</QBXML>

What syntax can I use to insert a group item into a purchase order line? I belive this syntax works for InvoiceLines and EstimateLines.

 

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-10-18 11:56:55

You are correct, Group inserts into the PurchaseOrderLine currently fail using QODBC v7.00.00.194:

INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
"PurchaseOrderLineGroupItemGroupRefListID","FQSaveToCache")
VALUES ('10000-933272655', 'Group1', '580000-1197762645', 0)

006-10-17 18:40:05 QODBC Ver:  7.00.00.194 *********************************************************************************************************************
IsAService: False
SQL Statement: INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber", "PurchaseOrderLineGroupItemGroupRefListID","FQSaveToCache")
VALUES ('10000-933272655', 'Group1', '580000-1197762645', 0)
Error parsing complete XML return string (8)
Input XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?qbxml version="5.0"?>
<QBXML>
    <QBXMLMsgsRq onError = "continueOnError" responseData = "includeAll">
        <PurchaseOrderAddRq requestID = "1">
            <PurchaseOrderAdd defMacro = "TxnID:277C1932-FA3B-4850-B98E-1F614BC78CAC">
                <VendorRef>
                    <ListID>10000-933272655</ListID>
                </VendorRef>
                <RefNumber>Group1</RefNumber>
                <PurchaseOrderGroupLineAdd>
                    <ItemGroupRef>
                        <ListID>580000-1197762645</ListID>
                    </ItemGroupRef>
                </PurchaseOrderGroupLineAdd>
            </PurchaseOrderAdd>
        </PurchaseOrderAddRq>
    </QBXMLMsgsRq>
</QBXML>

20061017.185135 I 1708 QBSDKProcessRequest Application named 'FLEXquarters QODBC' starting requests (process 3908).
20061017.185135 E 1708 XercesSAXErrorHandler Unknown element 'PurchaseOrderGroupLineAdd' -- error at line 7, column 114 in XML data.
20061017.185135 I 1708 MsgSetHandler Parser error, finishing.
20061017.185135 I 1708 QBSDKProcessRequest Application named 'FLEXquarters QODBC' finishing requests (process 3908), ret = 1.
20061017.185135 E 3908 RequestProcessor Process Request error = 80042500, There was an error when parsing the provided XML file

The problem has been reported to the QODBC Software Engineer for resolution.

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-11-24 11:17:23

This is now fixed using QODBC v7.00.00.199 (or higher). Let's start by creating a new itemgroup example with three lines using QODBC. Note the FQSaveToCache field, set to True except on the last one.

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

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

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

and the result looks like this in QuickBooks 2006:



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

SELECT ListID, Name, ItemDesc, IsActive FROM ItemGroup

We can now raise a Purchase Order using item group by using the ListID: '580000-1197762645' and doing one simple QODBC insert statement:

INSERT INTO "PurchaseOrderLine" ("VendorRefListID", "RefNumber",
"PurchaseOrderLineGroupItemGroupRefListID","FQSaveToCache")
VALUES ('10000-933272655', 'Group1', '580000-1197762645', 0)

When we look at the new Purchase Order in QuickBooks 2006 we will see:

Note: The Qty, Rate and the Amount are shown as 0 for Floor Plans and Concrete Slab, not because QODBC made a mistake. You simply need to correct the rate for the service or stock item:  

 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to