scotsun 3/7/2016 4:47:41 PM

ConnectMethods UpdateEntity return error Root element () not found.

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 :(

- <root>
- <eConnect ACTION="0" Requester_DOCTYPE="Sales_Transaction" DBNAME="NP12" TABLENAME="SOP10100" DATE1="1900-01-01T00:00:00" SOPNUMBE="2175575" SOPTYPE="2">
- <SO_Trans>
  <SOPNUMBE>2175575</SOPNUMBE>
  <SOPTYPE>2</SOPTYPE>
  <ORIGTYPE>0</ORIGTYPE>
  <ORIGNUMB />
  <DOCID>STDORD</DOCID>
  <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>
  <ACTLSHIP>2016-03-07T00:00:00</ACTLSHIP>
  <DISCDATE>1900-01-01T00:00:00</DISCDATE>
  <DUEDATE>2016-03-07T00:00:00</DUEDATE>
  <REPTING>0</REPTING>
  <TRXFREQU>0</TRXFREQU>
  <TIMEREPD>0</TIMEREPD>
  <TIMETREP>0</TIMETREP>
  <DYSTINCR>0</DYSTINCR>
  <DTLSTREP>1900-01-01T00:00:00</DTLSTREP>
  <DSTBTCH1 />
  <DSTBTCH2 />
  <USDOCID1>BKORD</USDOCID1>
  <USDOCID2>STDINV</USDOCID2>
  <DISCFRGT>0.00000</DISCFRGT>
  <ORDAVFRT>0.00000</ORDAVFRT>
  <DISCMISC>0.00000</DISCMISC>
  <ORDAVMSC>0.00000</ORDAVMSC>
  <DISAVAMT>0.00000</DISAVAMT>
  <ORDAVAMT>0.00000</ORDAVAMT>
  <DISCRTND>0.00000</DISCRTND>
  <ORDISRTD>0.00000</ORDISRTD>
  <DISTKNAM>0.00000</DISTKNAM>
  <ORDISTKN>0.00000</ORDISTKN>
  <DSCPCTAM>0</DSCPCTAM>
  <DSCDLRAM>0.00000</DSCDLRAM>
  <ORDDLRAT>0.00000</ORDDLRAT>
  <DISAVTKN>0.00000</DISAVTKN>
  <ORDATKN>0.00000</ORDATKN>
  <PYMTRMID>Net 30</PYMTRMID>
  <PRCLEVEL>PP </PRCLEVEL>
  <LOCNCODE>MIA-FL</LOCNCODE>
  <BCHSOURC>Sales Entry</BCHSOURC>
  <BACHNUMB>EGV-IL160888</BACHNUMB>
  <CUSTNMBR>PP1027</CUSTNMBR>
  <CUSTNAME>PP Sales</CUSTNAME>
  <CSTPONBR>8874</CSTPONBR>
  <PROSPECT>0</PROSPECT>
  <MSTRNUMB>164319</MSTRNUMB>
  <PCKSLPNO />
  <PICTICNU />
  <MRKDNAMT>0.00000</MRKDNAMT>
  <ORMRKDAM>0.00000</ORMRKDAM>
  <PRBTADCD>PRIMARY</PRBTADCD>
  <PRSTADCD>PRIMARY</PRSTADCD>
  <CNTCPRSN>PP </CNTCPRSN>
  <ShipToName>test</ShipToName>
  <ADDRESS1>7122 W SASA BLVD</ADDRESS1>
  <ADDRESS2 />
  <ADDRESS3 />
  <CITY>Plastburg </CITY>
  <STATE>FL</STATE>
  <ZIPCODE>33317</ZIPCODE>
  <COUNTRY />
  <PHNUMBR1>885885555500</PHNUMBR1>
  <PHNUMBR2 />
  <PHONE3 />
  <FAXNUMBR />
  <COMAPPTO>0</COMAPPTO>
  <COMMAMNT>0.00000</COMMAMNT>
  <OCOMMAMT>0.00000</OCOMMAMT>
  <CMMSLAMT>0.00000</CMMSLAMT>
  <ORCOSAMT>0.00000</ORCOSAMT>
  <NCOMAMNT>0.00000</NCOMAMNT>
  <ORNCMAMT>0.00000</ORNCMAMT>
  <SHIPMTHD>CPU</SHIPMTHD>
  <TRDISAMT>0.00000</TRDISAMT>
  <ORTDISAM>0.00000</ORTDISAM>
  <TRDISPCT>0</TRDISPCT>
  <SUBTOTAL>750.00000</SUBTOTAL>
  <ORSUBTOT>750.00000</ORSUBTOT>
  <REMSUBTO>750.00000</REMSUBTO>
  <OREMSUBT>750.00000</OREMSUBT>
  <EXTDCOST>0.00000</EXTDCOST>
  <OREXTCST>0.00000</OREXTCST>
  <FRTAMNT>0.00000</FRTAMNT>
  <ORFRTAMT>0.00000</ORFRTAMT>
  <MISCAMNT>0.00000</MISCAMNT>
  <ORMISCAMT>0.00000</ORMISCAMT>
  <TXENGCLD>0</TXENGCLD>
  <TAXEXMT1 />
  <TAXEXMT2 />
  <TXRGNNUM />
  <TAXSCHID>OTHER</TAXSCHID>
  <TXSCHSRC>2</TXSCHSRC>
  <BSIVCTTL>0</BSIVCTTL>
  <FRTSCHID />
  <FRTTXAMT>0.00000</FRTTXAMT>
  <ORFRTTAX>0.00000</ORFRTTAX>
  <FRGTTXBL>1</FRGTTXBL>
  <MSCSCHID />
  <MSCTXAMT>0.00000</MSCTXAMT>
  <ORMSCTAX>0.00000</ORMSCTAX>
  <MISCTXBL>1</MISCTXBL>
  <BKTFRTAM>0.00000</BKTFRTAM>
  <ORBKTFRT>0.00000</ORBKTFRT>
  <BKTMSCAM>0.00000</BKTMSCAM>
  <ORBKTMSC>0.00000</ORBKTMSC>
  <BCKTXAMT>0.00000</BCKTXAMT>
  <OBTAXAMT>0.00000</OBTAXAMT>
  <TXBTXAMT>0.00000</TXBTXAMT>
  <OTAXTAMT>0.00000</OTAXTAMT>
  <TAXAMNT>0.00000</TAXAMNT>
  <ORTAXAMT>0.00000</ORTAXAMT>
  <ECTRX>0</ECTRX>
  <DOCAMNT>750.00000</DOCAMNT>
  <ORDOCAMT>750.00000</ORDOCAMT>
  <PYMTRCVD>0.00000</PYMTRCVD>
  <ORPMTRVD>0.00000</ORPMTRVD>
  <DEPRECVD>0.00000</DEPRECVD>
  <ORDEPRVD>0.00000</ORDEPRVD>
  <CODAMNT>0.00000</CODAMNT>
  <ORCODAMT>0.00000</ORCODAMT>
  <ACCTAMNT>750.00000</ACCTAMNT>
  <ORACTAMT>750.00000</ORACTAMT>
  <SALSTERR>USA</SALSTERR>
  <SLPRSNID />
  <UPSZONE />
  <TIMESPRT>0</TIMESPRT>
  <PSTGSTUS>0</PSTGSTUS>
  <VOIDSTTS>0</VOIDSTTS>
  <ALLOCABY>1</ALLOCABY>
  <NOTEINDX>634782.00000</NOTEINDX>
  <CURNCYID />
  <CURRNIDX>1007</CURRNIDX>
  <RATETPID />
  <EXGTBLID />
  <XCHGRATE>0.0000000</XCHGRATE>
  <DENXRATE>0.0000000</DENXRATE>
  <EXCHDATE>1900-01-01T00:00:00</EXCHDATE>
  <TIME1>1900-01-01T00:00:00</TIME1>
  <RTCLCMTD>0</RTCLCMTD>
  <MCTRXSTT>0</MCTRXSTT>
  <TRXSORCE />
  <COMMNTID />
  <REFRENCE />
  <POSTEDDT>1900-01-01T00:00:00</POSTEDDT>
  <PTDUSRID />
  <USER2ENT />
  <CREATDDT>2016-03-07T00:00:00</CREATDDT>
  <MODIFDT>2016-03-07T00:00:00</MODIFDT>
  <Tax_Date>1900-01-01T00:00:00</Tax_Date>
  <APLYWITH>0</APLYWITH>
  <WITHHAMT>0.00000</WITHHAMT>
  <SHPPGDOC>0</SHPPGDOC>
  <CORRCTN>0</CORRCTN>
  <SIMPLIFD>0</SIMPLIFD>
  <CORRNXST>0</CORRNXST>
  <DOCNCORR />
  <SEQNCORR>0</SEQNCORR>
  <SALEDATE>1900-01-01T00:00:00</SALEDATE>
  <EXCEPTIONALDEMAND>0</EXCEPTIONALDEMAND>
  <Flags>1</Flags>
  <BackoutTradeDisc>0.00000</BackoutTradeDisc>
  <OrigBackoutTradeDisc>0.00000</OrigBackoutTradeDisc>
  <GPSFOINTEGRATIONID />
  <INTEGRATIONSOURCE>0</INTEGRATIONSOURCE>
  <INTEGRATIONID />
  <Commissions />
  <Distribution />
  <Payments />
- <Holds>
  <SOPTYPE>2</SOPTYPE>
  <SOPNUMBE>2175575</SOPNUMBE>
  <PRCHLDID>DEFAULT</PRCHLDID>
  <DELETE1>0</DELETE1>
  <USERID>hdiaz</USERID>
  <HOLDDATE>2016-03-07T00:00:00</HOLDDATE>
  <TIME1>1900-01-01T09:12:20</TIME1>
  <TRXSORCE />
  </Holds>
  <UserDefined />
  <Deposit />
  <Notes />
- <Line>
  <SOPNUMBE>2175575</SOPNUMBE>
  <SOPTYPE>2</SOPTYPE>
  <CMPNTSEQ>0</CMPNTSEQ>
  <LNITMSEQ>1</LNITMSEQ>
  <ITEMNMBR>11GBED50</ITEMNMBR>
  <ITEMDESC>The PPP Mattress</ITEMDESC>
  <NONINVEN>0</NONINVEN>
  <DROPSHIP>0</DROPSHIP>
  <UOFM>EA</UOFM>
  <LOCNCODE>MIA-FL</LOCNCODE>
  <UNITCOST>337.37000</UNITCOST>
  <ORUNTCST>337.37000</ORUNTCST>
  <UNITPRCE>750.00000</UNITPRCE>
  <ORUNTPRC>750.00000</ORUNTPRC>
  <XTNDPRCE>750.00000</XTNDPRCE>
  <OXTNDPRC>750.00000</OXTNDPRC>
  <REMPRICE>750.00000</REMPRICE>
  <OREPRICE>750.00000</OREPRICE>
  <EXTDCOST>337.37000</EXTDCOST>
  <OREXTCST>337.37000</OREXTCST>
  <MRKDNAMT>0.00000</MRKDNAMT>
  <ORMRKDAM>0.00000</ORMRKDAM>
  <MRKDNPCT>0</MRKDNPCT>
  <MRKDNTYP>0</MRKDNTYP>
  <INVINDX>23</INVINDX>
  <CSLSINDX>143</CSLSINDX>
  <SLSINDX>126</SLSINDX>
  <MKDNINDX>139</MKDNINDX>
  <RTNSINDX>23</RTNSINDX>
  <INUSINDX>0</INUSINDX>
  <INSRINDX>0</INSRINDX>
  <DMGDINDX>140</DMGDINDX>
  <ITMTSHID />
  <IVITMTXB>2</IVITMTXB>
  <BKTSLSAM>0.00000</BKTSLSAM>
  <ORBKTSLS>0.00000</ORBKTSLS>
  <TAXAMNT>0.00000</TAXAMNT>
  <ORTAXAMT>0.00000</ORTAXAMT>
  <TXBTXAMT>0.00000</TXBTXAMT>
  <OTAXTAMT>0.00000</OTAXTAMT>
  <BSIVCTTL>0</BSIVCTTL>
  <TRDISAMT>0.00000</TRDISAMT>
  <ORTDISAM>0.00000</ORTDISAM>
  <DISCSALE>0.00000</DISCSALE>
  <ORDAVSLS>0.00000</ORDAVSLS>
  <QUANTITY>1.00000</QUANTITY>
  <ATYALLOC>1.00000</ATYALLOC>
  <QTYINSVC>0.00000</QTYINSVC>
  <QTYINUSE>0.00000</QTYINUSE>
  <QTYDMGED>0.00000</QTYDMGED>
  <QTYRTRND>0.00000</QTYRTRND>
  <QTYONHND>0.00000</QTYONHND>
  <QTYCANCE>0.00000</QTYCANCE>
  <QTYCANOT>0.00000</QTYCANOT>
  <QTYONPO>0.00000</QTYONPO>
  <QTYORDER>0.00000</QTYORDER>
  <QTYPRBAC>0.00000</QTYPRBAC>
  <QTYPRBOO>0.00000</QTYPRBOO>
  <QTYPRINV>0.00000</QTYPRINV>
  <QTYPRORD>0.00000</QTYPRORD>
  <QTYPRVRECVD>0.00000</QTYPRVRECVD>
  <QTYRECVD>0.00000</QTYRECVD>
  <QTYREMAI>1.00000</QTYREMAI>
  <QTYREMBO>0.00000</QTYREMBO>
  <QTYTBAOR>0.00000</QTYTBAOR>
  <QTYTOINV>1.00000</QTYTOINV>
  <QTYTORDR>0.00000</QTYTORDR>
  <QTYFULFI>1.00000</QTYFULFI>
  <QTYSLCTD>1.00000</QTYSLCTD>
  <QTYBSUOM>1.00000</QTYBSUOM>
  <EXTQTYAL>303.00000</EXTQTYAL>
  <EXTQTYSEL>0.00000</EXTQTYSEL>
  <ReqShipDate>2016-03-07T00:00:00</ReqShipDate>
  <FUFILDAT>2016-03-07T00:00:00</FUFILDAT>
  <ACTLSHIP>2016-03-07T00:00:00</ACTLSHIP>
  <SHIPMTHD>FDEG</SHIPMTHD>
  <SALSTERR>USA</SALSTERR>
  <SLPRSNID />
  <PRCLEVEL>PPP </PRCLEVEL>
  <COMMNTID />
  <BRKFLD1>0</BRKFLD1>
  <BRKFLD2>0</BRKFLD2>
  <BRKFLD3>0</BRKFLD3>
  <CURRNIDX>1007</CURRNIDX>
  <TRXSORCE />
  <ORGSEQNM>0</ORGSEQNM>
  <ITEMCODE />
  <PURCHSTAT>1</PURCHSTAT>
  <DECPLQTY>1</DECPLQTY>
  <DECPLCUR>3</DECPLCUR>
  <ODECPLCU>3</ODECPLCU>
  <QTYTOSHP>0.00000</QTYTOSHP>
  <XFRSHDOC>0</XFRSHDOC>
  <EXCEPTIONALDEMAND>0</EXCEPTIONALDEMAND>
  <TAXSCHID>BROWARDFL</TAXSCHID>
  <TXSCHSRC>2</TXSCHSRC>
  <PRSTADCD>PRIMARY</PRSTADCD>
  <ShipToName>test</ShipToName>
  <CNTCPRSN>test</CNTCPRSN>
  <ADDRESS1>test</ADDRESS1>
  <ADDRESS2>test</ADDRESS2>
  <ADDRESS3>test</ADDRESS3>
  <CITY>test</CITY>
  <STATE>test</STATE>
  <ZIPCODE>test</ZIPCODE>
  <COUNTRY>US</COUNTRY>
  <PHONE1 />
  <PHONE2 />
  <PHONE3 />
  <FAXNUMBR />
  <Flags>1</Flags>
  <BackoutTradeDisc>0.00000</BackoutTradeDisc>
  <OrigBackoutTradeDisc>0.00000</OrigBackoutTradeDisc>
  <GPSFOINTEGRATIONID />
  <INTEGRATIONSOURCE>0</INTEGRATIONSOURCE>
  <INTEGRATIONID />
  <CONTNBR />
  <CONTLNSEQNBR>0.00000</CONTLNSEQNBR>
  <CONTSTARTDTE>1900-01-01T00:00:00</CONTSTARTDTE>
  <CONTENDDTE>1900-01-01T00:00:00</CONTENDDTE>
  <CONTITEMNBR />
  <CONTSERIALNBR />
  <LineTax />
  </Line>
  </SO_Trans>
  </eConnect>
  </root>

Version: Unknown or N/A
Section: Dynamics GP, eConnect


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3