问题
Here is my qbxml for item update.
I have copied my xml here
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?qbxml version="6.0"?>
- <QBXML>
- <QBXMLMsgsRq onError="stopOnError">
- <ItemInventoryModRq>
- <ItemInventoryMod>
<ListID>80000064-1393879476</ListID>
<EditSequence>1393879476</EditSequence>
<Name>Abco Trading</Name>
<SalesDesc>Abco Trading</SalesDesc>
- <IncomeAccountRef>
<FullName>Income</FullName>
</IncomeAccountRef>
<PurchaseDesc>Abco Trading</PurchaseDesc>
<PurchaseCost>0</PurchaseCost>
- <COGSAccountRef>
<FullName>Cost of Goods Sold</FullName>
</COGSAccountRef>
- <AssetAccountRef>
<FullName>Inventory Asset</FullName>
</AssetAccountRef>
</ItemInventoryMod>
</ItemInventoryModRq>
</QBXMLMsgsRq>
</QBXML>
For Non Inventory Item mod
<?xml version="1.0" encoding="ISO-8859-1" ?>
<?qbxml version="6.0"?>
- <QBXML>
- <QBXMLMsgsRq onError="stopOnError">
- <ItemNonInventoryModRq>
- <ItemNonInventoryMod>
<ListID>80000069-1394118592</ListID>
<EditSequence>1394118592</EditSequence>
<Name>Dawson and Sons</Name>
<SalesDesc>Dawson and Sons</SalesDesc>
- <IncomeAccountRef>
<FullName>Income</FullName>
</IncomeAccountRef>
<PurchaseDesc>Dawson and Sons</PurchaseDesc>
<PurchaseCost>0</PurchaseCost>
- <ExpenseAccountRef>
<FullName>Expense</FullName>
</ExpenseAccountRef>
</ItemNonInventoryMod>
</ItemNonInventoryModRq>
</QBXMLMsgsRq>
</QBXML>
It gives me error "QuickBooks found an error when parsing the provided XML text stream
". I have checked sequence also. How to check qbxml for QBWC?
回答1:
Version 6.0 of the SDK does not support IncomeAccountRef as part of an ItemInventoryMod or ItemNonInventoryMod. You can view this using the On Screen Reference (https://developer-static.intuit.com/qbSDK-current/Common/newOSR/index.html) You can set the slider to version 6.0 to see what fields are allowed. If you change your request to use version 8.0 instead, which does include the IncomeAccountRef, the file validates.
I also used the QBXML Validator tool that gets installed wiht the SDK to validate the XML.
来源:https://stackoverflow.com/questions/22229278/qbwc-inventory-mod-noninventory-mod-gives-me-error-quickbooks-found-an-error-w