Problems with error parsing xml when adding NonInventoryItem
Options
Michelle Martin
Member Posts: 13 ✭
I'm trying to set up a test company file for my client and working out the best way to load list data. I'm on a trial developer's version of Reckon Accounts Enterprise Desktop 2020 and using the Intuit QuickBooks SDK to integrate with my 3rd party MS Access application.
I'm trying to set up a test company file for my client and working out the best way to load list data. I have set up most of the data using Import from Excel, but there are some fields that cannot seem to be loaded this way, e.g. BarCode in the Items list. So I'm using the QuickBooks SDK 6.0 qbXML to see if I can add items this way. But I'm getting a parse error.
Here is my request string:
<?xml version="1.0"?><?qbxml version="6.1"?><QBXML><QBXMLMsgsRq onError="stopOnError"><ItemNonInventoryAddRq requestID="3690"><Name>9330372000041</Name><BarCode><BarCodeValue>9330372000041</BarCodeValue></BarCode><IsActive>true</IsActive><IsTaxIncluded>false</IsTaxIncluded><SalesTaxCodeRef><FullName>GST</FullName></SalesTaxCodeRef><SalesAndPurchase><SalesDesc>Abelia grandiflora Nana 140mm</SalesDesc><SalesPrice>6</SalesPrice><IncomeAccountRef><FullName>Income:Sales:Flower & Plant Sales</FullName></IncomeAccountRef><PurchaseDesc>Abelia grandiflora Nana 140mm</PurchaseDesc><PurchaseCost>0</PurchaseCost><PurchaseTaxCodeRef><FullName>GST</FullName></PurchaseTaxCodeRef><ExpenseAccountRef><FullName>Cost of Sales:Purchases:Plants</FullName></ExpenseAccountRef></SalesAndPurchase></ItemNonInventoryAdd></ItemNonInventoryAddRq></QBXMLMsgsRq></QBXML>
And this is the error:
I'm trying to set up a test company file for my client and working out the best way to load list data. I have set up most of the data using Import from Excel, but there are some fields that cannot seem to be loaded this way, e.g. BarCode in the Items list. So I'm using the QuickBooks SDK 6.0 qbXML to see if I can add items this way. But I'm getting a parse error.
Here is my request string:
<?xml version="1.0"?><?qbxml version="6.1"?><QBXML><QBXMLMsgsRq onError="stopOnError"><ItemNonInventoryAddRq requestID="3690"><Name>9330372000041</Name><BarCode><BarCodeValue>9330372000041</BarCodeValue></BarCode><IsActive>true</IsActive><IsTaxIncluded>false</IsTaxIncluded><SalesTaxCodeRef><FullName>GST</FullName></SalesTaxCodeRef><SalesAndPurchase><SalesDesc>Abelia grandiflora Nana 140mm</SalesDesc><SalesPrice>6</SalesPrice><IncomeAccountRef><FullName>Income:Sales:Flower & Plant Sales</FullName></IncomeAccountRef><PurchaseDesc>Abelia grandiflora Nana 140mm</PurchaseDesc><PurchaseCost>0</PurchaseCost><PurchaseTaxCodeRef><FullName>GST</FullName></PurchaseTaxCodeRef><ExpenseAccountRef><FullName>Cost of Sales:Purchases:Plants</FullName></ExpenseAccountRef></SalesAndPurchase></ItemNonInventoryAdd></ItemNonInventoryAddRq></QBXMLMsgsRq></QBXML>
And this is the error:
0
Comments
-
Hi Michelle,
Thank you for your post.
Barcode field isn't supported like this in the qbXML. Can you please try to post without the barcode data and let us how know it goes?
Thanks
Ifti1 -
Hi Ifti
I tried it again but without Barcode, but same error.
Here's the string I sent:
<?xml version="1.0"?><?qbxml version="6.1"?><QBXML><QBXMLMsgsRq onError="stopOnError"><ItemNonInventoryAddRq requestID="3690"><Name>9330372000041</Name><IsActive>true</IsActive><IsTaxIncluded>false</IsTaxIncluded><SalesTaxCodeRef><FullName>GST</FullName></SalesTaxCodeRef><SalesAndPurchase><SalesDesc>Abelia grandiflora Nana 140mm</SalesDesc><SalesPrice>6</SalesPrice><IncomeAccountRef><FullName>Income:Sales:Flower & Plant Sales</FullName></IncomeAccountRef><PurchaseDesc>Abelia grandiflora Nana 140mm</PurchaseDesc><PurchaseCost>0</PurchaseCost><PurchaseTaxCodeRef><FullName>GST</FullName></PurchaseTaxCodeRef><ExpenseAccountRef><FullName>Cost of Sales:Purchases:Plants</FullName></ExpenseAccountRef></SalesAndPurchase></ItemNonInventoryAdd></ItemNonInventoryAddRq></QBXMLMsgsRq></QBXML>
0 -
Hi Michelle,
You're receiving the XML error due to having "&" in the <FullName> under <IncomeAccountRef>.
You will need to replace it with & to overcome this.
Please give that a shot and let us know how you go.
Thanks
Ifti1 -
HI Ifti
I changed the Account name to "and" instead of "&" which was easier in the end. I was still getting the parse error, and discovered while querying an item that when I imported items from Excel, it did not set up the Purchase fields but returned SalesOrPurchase information. So then I tried adding a new item via qbXML with SalesAndPurchase fields, and that worked. But I get a parse error if I try and post SalesAndPurchase fields to the SalesOrPurchase items with ItemNonInventoryMod.
Do I have to delete those items and add them all through qbXML?
Thanks for you patience while I get a handle on all this!
0 -
Hi Michelle,
No worries, happy to help.
I think it's better to create via qbXML as that gets rid of other issues and keeps it clean.
Thanks
Ifti1 -
I just had another look at the fine print (no really, the clear explanation) under ItemNonInventory and it states clearly that you can't change a SalesOrPurchase to SalesAndPurchase using a Mod Rq. And I also note that the BarCode element is in V12.0 and Reckon uses V6.1. Oh dear, humble pie!0
-
i dont think the SDK has provison for Bar codes, Manufacturing Parts and UOM.
The Intuit version has as you stated .
Ifti can reconfirm meCosmic Accounting Group
Accountants and Tax Agents 22397009
0 -
The workaround is to create a Custom field for Barcode and add the information via <DataExtRet>.
1 -
what about MParts and UOM , can we do same , Ifti
Cosmic Accounting Group
Accountants and Tax Agents 22397009
0
Categories
- All Categories
- 6.4K Accounts Hosted
- 10 📢 Reckon Accounts Hosted - Announcements
- 5.9K Reckon Accounts (Desktop)
- 3 📢 Reckon Accounts Desktop - Announcements
- 1.3K Reckon Payroll 🚀
- 21 📢 Reckon Payroll - Announcements
- 21 Reckon Payroll Help Videos 🎥
- 21 Reckon Mate App
- 3K Reckon One
- 7 📢 Reckon One - Announcements
- 10 Reckon Invoices App
- 14 Reckon Insights
- 107 Reckon API
- 822 Payroll Premier
- 307 Point of Sale
- 1.9K Personal Plus and Home & Business
- 63 About Reckon Community