stevegray
4Penny.net
Points: 55509

11/3/2012 10:19:11 AM

eConnect - Retrieve a Customer

* This article, and all our great eConnect documentation, Is available on the eConnect menu

This is our first article on retrieving objects using eConnect, so this is all new ground. I expect we'll be fine tuning the code and developing wrapper classes... but this is what we have for now.

This is sample code to retrieve a customer from Dynamics using eConnect. The customer that we get back looks like this:

 

<root>
    <eConnect ACTION="0" Requester_DOCTYPE="Customer" DBNAME="TWO" TABLENAME="RM00101" DATE1="1900-01-01T00:00:00" CUSTNMBR="AARONFIT0001">
        <Customer>
            <CUSTNMBR>AARONFIT0001</CUSTNMBR>
            <ADDRESS1>One Microsoft Way</ADDRESS1>
            <ADDRESS2></ADDRESS2>
            <ADDRESS3></ADDRESS3>
            <ADRSCODE>PRIMARY</ADRSCODE>
            <CITY>Redmond</CITY>
            <CNTCPRSN>Bob Fitz</CNTCPRSN>
            <COUNTRY>USA</COUNTRY>
            <CPRCSTNM></CPRCSTNM>
            <CURNCYID>Z-US$</CURNCYID>
            <CUSTCLAS>USA-ILMO-T1</CUSTCLAS>
            <CUSTDISC>0</CUSTDISC>
            <CUSTNAME>Aaron Fitz Electrical</CUSTNAME>
            <PHONE1>42555501010000</PHONE1>
            <PHONE2>00000000000000</PHONE2>
            <PHONE3></PHONE3>
            <FAX>31255501010000</FAX>
            <PYMTRMID>Net 30</PYMTRMID>
            <SALSTERR></SALSTERR>
            <SHIPMTHD>LOCAL DELIVERY</SHIPMTHD>
            <SLPRSNID></SLPRSNID>
            <STATE>WA</STATE>
            <TAXSCHID>MYSCHED</TAXSCHID>
            <TXRGNNUM></TXRGNNUM>
            <UPSZONE></UPSZONE>
            <ZIP>98052-6399</ZIP>
            <STMTNAME>Aaron Fitz Electrical</STMTNAME>
            <SHRTNAME>Aaron Fitz Elec</SHRTNAME>
            <PRBTADCD>PRIMARY</PRBTADCD>
            <PRSTADCD>WAREHOUSE</PRSTADCD>
            <STADDRCD>PRIMARY</STADDRCD>
            <CHEKBKID>UPTOWN TRUST</CHEKBKID>
            <CRLMTTYP>1</CRLMTTYP>
            <CRLMTAMT>0.00000</CRLMTAMT>
            <CRLMTPER>0</CRLMTPER>
            <CRLMTPAM>0.00000</CRLMTPAM>
            <RATETPID></RATETPID>
            <PRCLEVEL>SPECIAL</PRCLEVEL>
            <MINPYTYP>0</MINPYTYP>
            <MINPYDLR>0.00000</MINPYDLR>
            <MINPYPCT>0</MINPYPCT>
            <FNCHATYP>1</FNCHATYP>
            <FNCHPCNT>150</FNCHPCNT>
            <FINCHDLR>0.00000</FINCHDLR>
            <MXWOFTYP>2</MXWOFTYP>
            <MXWROFAM>25.00000</MXWROFAM>
            <COMMENT1></COMMENT1>
            <COMMENT2></COMMENT2>
            <USERDEF1>925485US00</USERDEF1>
            <USERDEF2>925485US00</USERDEF2>
            <TAXEXMT1></TAXEXMT1>
            <TAXEXMT2></TAXEXMT2>
            <BALNCTYP>0</BALNCTYP>
            <STMTCYCL>5</STMTCYCL>
            <BANKNAME></BANKNAME>
            <BNKBRNCH></BNKBRNCH>
            <FRSTINDT>1900-01-01T00:00:00</FRSTINDT>
            <INACTIVE>0</INACTIVE>
            <HOLD>0</HOLD>
            <CRCARDID></CRCARDID>
            <CRCRDNUM></CRCRDNUM>
            <CCRDXPDT>1900-01-01T00:00:00</CCRDXPDT>
            <KPDSTHST>1</KPDSTHST>
            <KPCALHST>1</KPCALHST>
            <KPERHIST>1</KPERHIST>
            <KPTRXHST>1</KPTRXHST>
            <CREATDDT>1980-01-01T00:00:00</CREATDDT>
            <MODIFDT>2012-04-13T00:00:00</MODIFDT>
            <Revalue_Customer>1</Revalue_Customer>
            <Post_Results_To>0</Post_Results_To>
            <FINCHID></FINCHID>
            <GOVCRPID></GOVCRPID>
            <GOVINDID></GOVINDID>
            <DISGRPER>0</DISGRPER>
            <DUEGRPER>0</DUEGRPER>
            <DOCFMTID></DOCFMTID>
            <Send_Email_Statements>0</Send_Email_Statements>
            <GPSFOINTEGRATIONID></GPSFOINTEGRATIONID>
            <INTEGRATIONSOURCE>0</INTEGRATIONSOURCE>
            <INTEGRATIONID></INTEGRATIONID>
        </Customer>
    </eConnect>
</root>
4Penny.net
Version: GP 2010
Section: 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