使用 QbXml 添加或修改员工时出现以下错误:QuickBooks 在解析提供的 XML 文本流时发现错误。
我试过真/假(这是它返回的值)、是/否和 1/0;这些似乎都不起作用。
是否可以为员工设置 IsActive 字段?我错过了什么吗?
谢谢!
抛出的异常是:
{System.Runtime.InteropServices.COMException (0x80040400): QuickBooks found an error when parsing the provided XML text stream.
at Interop.QBXMLRP2.IRequestProcessor4.ProcessRequest(String ticket, String inputRequest)
at PayrolImport.Program.Main(String[] args) in Program.cs:line 251
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()}
XML
<?xml version="1.0"?>
<?qbxml version="12.0"?>
<QBXML>
<QBXMLMsgsRq onError="stopOnError">
<EmployeeModRq>
<EmployeeMod>
<ListID>8000007D-1367847338</ListID>
<EditSequence>1367850617</EditSequence>
<FirstName>first name</FirstName>
<MiddleName>middle name</MiddleName>
<LastName>last name</LastName>
<IsActive>true</IsActive>
<Email></Email>
<AccountNumber>1</AccountNumber>
</EmployeeMod>
</EmployeeModRq>
</QBXMLMsgsRq>
</QBXML>