Quantcast
Viewing all articles
Browse latest Browse all 2823

Can't Update Contact Activities from XML by DI

I made new activity, save the XML to file, and when I try to read the XML file, it has collapsed.

The code:

 

Try

     Dim odocument As SAPbobsCOM.Contacts

     odocument = SapCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oContacts)

     Dim sFile As String = "C:\...xml"

     If odocument.GetByKey(8) = True Then

          odocument.SaveXML(sFile)

          odocument = SapCompany.GetBusinessObjectFromXML(sFile, 0)          'Here it has collapsed.

          iRet = odocument.Update

     End if

Catch ex As Exception

     MsgBox(ex.Message)

End Try

 

 

The very long error message:

"<ErrorList><Error>System Id = 322260424, Line Number = 1, Column Number = 79, Description = The namespace of element 'schema' must be from the schema namespace.</Error><Error>...."

 

XML example:

 

<?xml version="1.0" encoding="UTF-16"?>

<BOM>

<BO>

<AdmInfo>

<Object>33</Object>

</AdmInfo>

<OCLG>

<row>

<ClgCode>8</ClgCode>

<CardCode>C30000</CardCode>

<Action>M</Action>

<endDate>20160301</endDate>

<ENDTime>1816</ENDTime>

</row>

</OCLG>

</BO>

</BOM>

 

 

No problem to add new activity from XML.

 

How do I update an existing activity?


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>