Skip to Content

diapi update failed from xml.

Sep 08, 2017 at 09:09 AM


avatar image
Former Member

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:

 <Comments>hello world</Comments>

way 1:

for (int i = 0; i < Company.GetXMLelementCount(FilePath); i++)
                           var objectType = Company.GetXMLobjectType(FilePath, i);
                           var bo = (Documents)Company.GetBusinessObject(objectType);

way 2:

for (int i = 0; i < Company.GetXMLelementCount(FilePath); i++)
                            var bo = (Documents)Company.GetBusinessObjectFromXML(FilePath,i);
10 |10000 characters needed characters left characters exceeded

Hi Eric,

What error did you catch?

Call your update with the following validation:

if (bo.Update() != 0)

After this, share your error.

Hope it helps.

Kind Regards,

Diego Lother

Former Member

i certainly know how to catch the exception, but still thank you for your answer.

i guess this xml format cannot be processed with default update method of DIAPI.

* Please Login or Register to Answer, Follow or Comment.

0 Answers