eConnectOut example code

This article contains a short, working code example for getting a list of vendors from GP using eConnect out

Related Articles

... and you 'll find more on the eConnect Menu

Dim oeConnectType As New eConnectType
 
Dim myReqType As RQeConnectOutType = New RQeConnectOutType()
 
' Create an eConnectOut XML node object
Dim myeConnectOut As eConnectOut = New eConnectOut()
 
'SETUP: Vendor Name and ID Retrieval
myeConnectOut.DOCTYPE = "Vendor"
myeConnectOut.OUTPUTTYPE = 0
myeConnectOut.FORLIST = 0 'don't return the data in XML
myeConnectOut.FORLOAD = 1 'populate the eConnect_out table
myeConnectOut.ACTION = 0 'all records (not just inserts, deletes, etc)
myeConnectOut.WhereClause = "VENDSTTS  = 1"
 
' Add the eConnectOut XML node object to the RQeConnectOutType schema object
myReqType.eConnectOut = myeConnectOut
 
' Add the RQeConnectOutType schema object to the eConnect document object
Dim myReqOutType As RQeConnectOutType() = {myReqType}
oeConnectType.RQeConnectOutType = myReqOutType
 
'create an instance of our eConnectOut class, documented here
Dim oeConnectFunctions As New DynConnect.eConnectFunctions("vmgp2015-03", "two")
 
'serialze the eConnect class into an XML document
Dim strEconnect As String = oeConnectFunctions.serialize(oeConnectType)
 
'submit the document to GP
Dim strResponse As String = oeConnectFunctions.GetEntity(strEconnect)

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences