で、を介しQuickbooks Pro 2009
て追加およびインポートしています。クイックブック自体には、顧客リスト用のオプションがありますが、独自のビジネス検証ロジックを定義しており、データを顧客用のクイックブック DB にプッシュしています。list of Customers
C# windows application
Import and Export
Quick Book では、下にカスタム フィールドを定義するオプションがありますAdditional Tab
。
プログラムで Quick Book List of Customers を追加しているときに、Built-In Field values
LikeCustomer Name
Company Name
や Etcの値を追加できますcustom fields
。エラーが表示されます...
提供された XML テキスト ストリームの解析中に、QuickBooks がエラーを検出しました。
カスタム フィールド データのプッシュ操作をスキップすると、定義済みフィールド データの受け渡しが正常に機能します。
私のコード:
XmlDocument inputXMLDoc = new XmlDocument();
inputXMLDoc.AppendChild(inputXMLDoc.CreateXmlDeclaration("1.0", null, null));
inputXMLDoc.AppendChild(inputXMLDoc.CreateProcessingInstruction("qbxml", "version=\"2.0\""));
XmlElement qbXML = inputXMLDoc.CreateElement("QBXML");
inputXMLDoc.AppendChild(qbXML);
XmlElement qbXMLMsgsRq = inputXMLDoc.CreateElement("QBXMLMsgsRq");
qbXML.AppendChild(qbXMLMsgsRq);
qbXMLMsgsRq.SetAttribute("onError", "stopOnError");
XmlElement custAddRq = inputXMLDoc.CreateElement("CustomerAddRq");
qbXMLMsgsRq.AppendChild(custAddRq);
custAddRq.SetAttribute("requestID", "1");
XmlElement custAdd = inputXMLDoc.CreateElement("CustomerAdd");
custAddRq.AppendChild(custAdd);
//In-Built Columns
custAdd.AppendChild(inputXMLDoc.CreateElement("Name")).InnerText = Name;
custAdd.AppendChild(inputXMLDoc.CreateElement("AccountNumber")).InnerText = AccountNumber;
//Defined Custom Columns
custAdd.AppendChild(inputXMLDoc.CreateElement("CUSTFLD1")).InnerText = JRNL_NO;
String name = CustName.Text.Trim();
string input = inputXMLDoc.OuterXml;
//Push the Data to do the qbXMLRP request
RequestProcessor2 rp = null;
string ticket = null;
string response = null;
try
{
rp = new RequestProcessor2();
rp.OpenConnection("", "IDN CustomerAdd C# sample");
ticket = rp.BeginSession("", QBFileMode.qbFileOpenDoNotCare);
response = rp.ProcessRequest(ticket, input);
}
catch (System.Runtime.InteropServices.COMException ex)
{
MessageBox.Show("COM Error Description = " + ex.Message, "COM error");
}
ここで何が間違っているのですか..何か助けになりますか?? または任意の提案/アイデア????