I'm trying to update the LOCNCODE for header and lines in SO transaction, but I get this error "Root element (<eConnect>) not found. Please verify xml document.The current root element is root"
this is my code:
Dim strDoc As String = oeConnectMethods.GetEntity(connectionString, doc.OuterXml)
strDoc = strDoc.Replace(oldLoc, newLoc) (here I replace <LOCNCODE>MIA-FL</LOCNCODE> for <LOCNCODE>EGV-IL</LOCNCODE>)
Try
oeConnectMethods.UpdateEntity(connectionString, strDoc)
Catch ex As Exception
Dim strMessage = ex.Message
Throw New Exception(strMessage)
End Try
this is my strDoc content, there is a <eConnect> element ..so I dont understand why the error :(
- <eConnect
ACTION="0"
Requester_DOCTYPE="Sales_Transaction" DBNAME="NP12"
TABLENAME="SOP10100" DATE1="1900-01-01T00:00:00"
SOPNUMBE="2175575" SOPTYPE="2">
<SOPNUMBE>2175575</SOPNUMBE>
<DOCDATE>2016-03-07T00:00:00</DOCDATE>
<GLPOSTDT>1900-01-01T00:00:00</GLPOSTDT>
<QUOTEDAT>1900-01-01T00:00:00</QUOTEDAT>
<QUOEXPDA>1900-01-01T00:00:00</QUOEXPDA>
<ORDRDATE>2016-03-07T00:00:00</ORDRDATE>
<INVODATE>1900-01-01T00:00:00</INVODATE>
<BACKDATE>1900-01-01T00:00:00</BACKDATE>
<RETUDATE>1900-01-01T00:00:00</RETUDATE>
<ReqShipDate>2016-03-07T00:00:00</ReqShipDate>
<FUFILDAT>2016-03-07T00:00:00</FUFILDAT>