2017 Sep 08 10:09 AM - edited 2024 Feb 04 12:54 AM
i have a xml file which is receiver <PayLoad> segment generated from b1i telegraph.
i want to update corrspoding entry using this xml file by diapi with dotnet.
but it failed. following is my code.
anyone can give me suggestion ?
xml file:
<?xmlversion="1.0"encoding="UTF-16"?>
<BOM>
<BO>
<AdmInfo>
<Object>22</Object>
<Version>2</Version>
</AdmInfo>
<QueryParams>
<DocEntry>5917</DocEntry>
</QueryParams>
<Documents>
<row>
<DocEntry>5917</DocEntry>
<CardCode>S2422</CardCode>
<NumAtCard>10285810</NumAtCard>
<DocDueDate>20170905</DocDueDate>
<Confirmed>tYES</Confirmed>
<Comments>hello world</Comments>
</row>
</Documents>
<Document_Lines>
<row>
<LineNum>0</LineNum>
<ItemCode>4933</ItemCode>
<Quantity>4710</Quantity>
</row>
</Document_Lines>
</BO>
</BOM>
way 1:
for (int i = 0; i < Company.GetXMLelementCount(FilePath); i++)
{
var objectType = Company.GetXMLobjectType(FilePath, i);
var bo = (Documents)Company.GetBusinessObject(objectType);
bo.UpdateFromXML(FilePath);
}
way 2:
for (int i = 0; i < Company.GetXMLelementCount(FilePath); i++)
{
var bo = (Documents)Company.GetBusinessObjectFromXML(FilePath,i);
bo.Update();
}
Request clarification before answering.
| User | Count |
|---|---|
| 26 | |
| 13 | |
| 13 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.