Troubleshooting - Creating PO using Alpha Five basic scripting not working correctly
Problem Description:
I am using Alpha 5 version 10.5 xbasic scripting to export our data to QB Enterprise 2016.
I have successfully exported our customer and inventory data without any issues, all data looks complete and is fully functional.
My problem is exporting our Supplier Orders. Following your tutorial How to create a Purchase Order using QODBC
It will not work correctly. It creates the PO in QB, however, it will only add the last line item to the PO. I am using the FQSaveToCache field set to 1 for all lines except the last which is set to 0 and it will only write the last line.
When I generate the SQL code from my A5 xbasic script to a text file and copy/paste the SQL code into Alpha 5's SQL command window, I get the same results, and only the last line item is written to the PO. When I paste it into the QODBC Test Tool program it works correctly, generating the PO with all line items as expected.
These are SQL lines generated from A5.
INSERT INTO PurchaseOrderLine (VendorRefListID, RefNumber, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, FQSaveToCache) VALUES ('80000172-1402174943', '14731', '80004374-1474850327', 10, 1)
INSERT INTO PurchaseOrderLine (VendorRefListID, RefNumber, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, FQSaveToCache) VALUES ('80000172-1402174943', '14731', '8000435E-1474850314', 10, 1)
INSERT INTO PurchaseOrderLine (VendorRefListID, RefNumber, PurchaseOrderLineItemRefListID, PurchaseOrderLineQuantity, FQSaveToCache) VALUES ('80000172-1402174943', '14731', '8000437A-1474850332', 10, 0)
Solution:
I think your connection is dropping during insertion & due to this issue happening. Please make sure that you are executing all queries in the current connection if the connection is reset, all lines will not be inserted. So please verify the same & test again.
|