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
|
|
Invoice insert failing (that XML error response) |
Author |
Message |
|
Posted : 2006-04-20 10:02:39 |
I've tried the stuff from the FAQ, but I'm still getting the error about parsing the XML string. Here are my queries:
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "InvoiceLineQuantity", "ARAccountRefListID", "FQSaveToCache") VALUES ('170000-1142219884', 'Washington Representatives 2004', 189, 189, '10000-1141927952', 1, '450000-1142219814', 1)
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "InvoiceLineQuantity", "ARAccountRefListID", "FQSaveToCache") VALUES ('270000-1145043665', 'Rush Charge', 10, 10, '10000-1141927952', 1, '4D0000-1142616802', 1)
insert into "Invoice" ("CustomerRefListID", "CustomerRefFullName", "TxnDate", "RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", "BillAddressState", "BillAddressPostalCode", "BillAddressCountry", "IsPending", "ItemSalesTaxRefListID") VALUES ('F90000-1144870402', 'Mestel & Company (A32339)', {d'2005-01-03'}, 'A34375', 'Mestel & Company', '1725 I Street Nw Ste 300', 'Washington', 'DC', '20006', '', 0, '50000-1142027295')
The two InvoiceLine items roll by just fine, but the Invoice insert fails. Help?
Blue skies, -Aaron |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-04-20 11:43:19 |
Taking a guess, the most likely reason is because you are missing the "ARAccountRefListID" in the last insert. For detailed step-by-step instructions see: How do I create Invoices? |
|
|
|
|
Posted : 2006-04-21 02:31:15 |
OK, I've read the step-by-step instructions, added more stuff that didn't really seem necessary, but I'm game to try, and I get exactly the same error as before.
Here are my updated SQL statements:
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "InvoiceLineQuantity", "ARAccountRefListID", "FQSaveToCache") VALUES ('170000-1142219884', 'Washington Representatives 2004', 189, 189, '10000-1141927952', 1, '450000-1142219814', 1)
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "InvoiceLineQuantity", "ARAccountRefListID", "FQSaveToCache") VALUES ('270000-1145043665', 'Rush Charge', 10, 10, '10000-1141927952', 1, '4D0000-1142616802', 1)
INSERT INTO "Invoice" ("CustomerRefListID", "ARAccountRefListID", "TxnDate", "RefNumber", "BillAddressAddr1", "BillAddressAddr2", "BillAddressCity", "BillAddressState", "BillAddressPostalCode", "BillAddressCountry", "IsPending", "TermsRefListID", "DueDate", "ShipDate", "ItemSalesTaxRefListID", "Memo", "IsToBePrinted", "CustomerSalesTaxCodeRefListID") VALUES ('F90000-1144870402', '430000-1142028408', {d'2005-01-03'}, 'A34375', 'Mestel & Company', '1725 I Street Nw Ste 300', 'Washington', 'DC', '20006', 'USA', 0, '40000-1142027014', {d'2005-01-03'}, {d'2005-01-03'}, '50000-1142027295', 'PMDS Import', 0, '10000-1141927952')
If you take the sample insert statement from the quoted instructions list and line it up with my insert statement for the Invoice insert, the only difference are the values. I tried eliminating the ampersand in the billing address 1 field, so that's not it. I rechecked every one of the ListID fields, and they match the appropriate rows found by using the queries in the instructions.
I'm stumped and frustrated. More help?
Blue skies, -Aaron |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-04-21 07:50:29 |
Actually your statements are not the same. The reason you are getting the XML error response is because the order of the columns doesn't match the order in the table. For example, your first statement should look like this:-
INSERT INTO "InvoiceLine" ("InvoiceLineItemRefListID", "InvoiceLineDesc", "InvoiceLineQuantity", "InvoiceLineRate", "InvoiceLineAmount", "InvoiceLineSalesTaxCodeRefListID", "FQSaveToCache") VALUES ('170000-1142219884', 'Washington Representatives 2004', 1, 189, 189, '10000-1141927952', 1)
which matches the order of the columns as seen using:-
sp_columns InvoiceLine
So when you add additional columns, you also need to check the order in the way they appear in the statement.
|
|
|
|
|
Posted : 2006-04-22 00:07:28 |
OK, my invoice insert is working now. (Yay!)
I hope that as feature requests go, better error messaging is on the list. The error message didn't point me at the problem.
Also, it's important to know that the insert done on InvoiceLine, if incorrect, doesn't actually get evaluated until the Invoice insert happens and can cause an error that appears to be associated with Invoice. I had assumed that my InvoiceLine inserts were fine because they executed without error.
Blue skies, -Aaron |
|
|
|
|