DynDeveloper.com

DynDeveloper.com

Sign Up Now! Log In

Archives

 

This article provides both a code and XML document example for the SOPDeleteDocumentType.

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>

This actually took me quite a while to figure out, there are no good examples on how to retrieve 'multi key' documents and no good help on figuring out what the keys are.

The example will document using eConnectOut to retrieve a Sales_Transaction document using the SOPNUMBE and SOPTYPE. We show how to use 'INDEX1FROM' and 'INDEX1TO', as well as how to use the WHERECLAUSE.

When retrieved, the sales document looks like this:

 

<root>
    <eConnect ACTION="0" Requester_DOCTYPE="Sales_Transaction" DBNAME="TWO" TABLENAME="SOP10100" DATE1="1900-01-01T00:00:00" SOPNUMBE="TEST01" SOPTYPE="3">
        <SO_Trans>
            <SOPNUMBE>TEST01</SOPNUMBE>
            <SOPTYPE>3</SOPTYPE>
            <ORIGTYPE>0</ORIGTYPE>
            <ORIGNUMB></ORIGNUMB>
            <DOCID>STDINV</DOCID>
            <DOCDATE>2017-04-12T00: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>1900-01-01T00:00:00</ORDRDATE>
            <INVODATE>2017-04-12T00:00:00</INVODATE>
            <BACKDATE>1900-01-01T00:00:00</BACKDATE>
            <RETUDATE>1900-01-01T00:00:00</RETUDATE>
            <ReqShipDate>2017-04-12T00:00:00</ReqShipDate>
            <FUFILDAT>2017-04-12T00:00:00</FUFILDAT>
            <ACTLSHIP>2017-04-12T00:00:00</ACTLSHIP>
            <DISCDATE>2017-04-12T00:00:00</DISCDATE>
            <DUEDATE>2017-05-12T00: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></DSTBTCH1>
            <DSTBTCH2></DSTBTCH2>
            <USDOCID1>BKORD</USDOCID1>
            <USDOCID2></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>SPECIAL</PRCLEVEL>
            <LOCNCODE>WAREHOUSE</LOCNCODE>
            <BCHSOURC>Sales Entry</BCHSOURC>
            <BACHNUMB>STEVE</BACHNUMB>
            <CUSTNMBR>AARONFIT0001</CUSTNMBR>
            <CUSTNAME>Aaron Fitz Electrical</CUSTNAME>
            <CSTPONBR></CSTPONBR>
            <PROSPECT>0</PROSPECT>
            <MSTRNUMB>452</MSTRNUMB>
            <PCKSLPNO></PCKSLPNO>
            <PICTICNU></PICTICNU>
            <MRKDNAMT>0.00000</MRKDNAMT>
            <ORMRKDAM>0.00000</ORMRKDAM>
            <PRBTADCD>PRIMARY</PRBTADCD>
            <PRSTADCD>WAREHOUSE</PRSTADCD>
            <CNTCPRSN>Bob Fitz</CNTCPRSN>
            <ShipToName>Aaron Fitz Electrical</ShipToName>
            <ADDRESS1>11403 45 St. South</ADDRESS1>
            <ADDRESS2></ADDRESS2>
            <ADDRESS3></ADDRESS3>
            <CITY>Chicago</CITY>
            <STATE>IL</STATE>
            <ZIPCODE>60603-0776</ZIPCODE>
            <COUNTRY>USA</COUNTRY>
            <PHNUMBR1>31255501020000</PHNUMBR1>
            <PHNUMBR2>31255501020000</PHNUMBR2>
            <PHONE3></PHONE3>
            <FAXNUMBR>31255501020000</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>LOCAL DELIVERY</SHIPMTHD>
            <TRDISAMT>0.00000</TRDISAMT>
            <ORTDISAM>0.00000</ORTDISAM>
            <TRDISPCT>0</TRDISPCT>
            <SUBTOTAL>32000.00000</SUBTOTAL>
            <ORSUBTOT>32000.00000</ORSUBTOT>
            <REMSUBTO>32000.00000</REMSUBTO>
            <OREMSUBT>32000.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>1</TXENGCLD>
            <TAXEXMT1></TAXEXMT1>
            <TAXEXMT2></TAXEXMT2>
            <TXRGNNUM></TXRGNNUM>
            <TAXSCHID>USASTCITY-6*</TAXSCHID>
            <TXSCHSRC>2</TXSCHSRC>
            <BSIVCTTL>0</BSIVCTTL>
            <FRTSCHID></FRTSCHID>
            <FRTTXAMT>0.00000</FRTTXAMT>
            <ORFRTTAX>0.00000</ORFRTTAX>
            <FRGTTXBL>3</FRGTTXBL>
            <MSCSCHID></MSCSCHID>
            <MSCTXAMT>0.00000</MSCTXAMT>
            <ORMSCTAX>0.00000</ORMSCTAX>
            <MISCTXBL>3</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>32000.00000</DOCAMNT>
            <ORDOCAMT>32000.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>32000.00000</ACCTAMNT>
            <ORACTAMT>32000.00000</ORACTAMT>
            <SALSTERR></SALSTERR>
            <SLPRSNID></SLPRSNID>
            <UPSZONE></UPSZONE>
            <TIMESPRT>0</TIMESPRT>
            <PSTGSTUS>0</PSTGSTUS>
            <VOIDSTTS>0</VOIDSTTS>
            <ALLOCABY>1</ALLOCABY>
            <NOTEINDX>575.00000</NOTEINDX>
            <CURNCYID>Z-US$</CURNCYID>
            <CURRNIDX>1007</CURRNIDX>
            <RATETPID></RATETPID>
            <EXGTBLID></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></TRXSORCE>
            <COMMNTID></COMMNTID>
            <REFRENCE></REFRENCE>
            <POSTEDDT>1900-01-01T00:00:00</POSTEDDT>
            <PTDUSRID></PTDUSRID>
            <USER2ENT>sa</USER2ENT>
            <CREATDDT>2012-11-03T00:00:00</CREATDDT>
            <MODIFDT>2012-11-03T00:00:00</MODIFDT>
            <Tax_Date>2017-04-12T00:00:00</Tax_Date>
            <APLYWITH>0</APLYWITH>
            <WITHHAMT>0.00000</WITHHAMT>
            <SHPPGDOC>0</SHPPGDOC>
            <CORRCTN>0</CORRCTN>
            <SIMPLIFD>0</SIMPLIFD>
            <CORRNXST>0</CORRNXST>
            <DOCNCORR></DOCNCORR>
            <SEQNCORR>0</SEQNCORR>
            <SALEDATE>1900-01-01T00:00:00</SALEDATE>
            <EXCEPTIONALDEMAND>0</EXCEPTIONALDEMAND>
            <Flags>0</Flags>
            <BackoutTradeDisc>0.00000</BackoutTradeDisc>
            <OrigBackoutTradeDisc>0.00000</OrigBackoutTradeDisc>
            <GPSFOINTEGRATIONID></GPSFOINTEGRATIONID>
            <INTEGRATIONSOURCE>0</INTEGRATIONSOURCE>
            <INTEGRATIONID></INTEGRATIONID>
            <Commissions/>
            <Distribution>
                <SOPTYPE>3</SOPTYPE>
                <SOPNUMBE>TEST01</SOPNUMBE>
                <SEQNUMBR>16384</SEQNUMBR>
                <DISTTYPE>2</DISTTYPE>
                <DistRef></DistRef>
                <ACTINDX>6</ACTINDX>
                <DEBITAMT>32000.00000</DEBITAMT>
                <ORDBTAMT>32000.00000</ORDBTAMT>
                <CRDTAMNT>0.00000</CRDTAMNT>
                <ORCRDAMT>0.00000</ORCRDAMT>
                <CURRNIDX>1007</CURRNIDX>
                <TRXSORCE></TRXSORCE>
                <POSTED>0</POSTED>
            </Distribution>
            <Distribution>
                <SOPTYPE>3</SOPTYPE>
                <SOPNUMBE>TEST01</SOPNUMBE>
                <SEQNUMBR>32768</SEQNUMBR>
                <DISTTYPE>1</DISTTYPE>
                <DistRef></DistRef>
                <ACTINDX>113</ACTINDX>
                <DEBITAMT>0.00000</DEBITAMT>
                <ORDBTAMT>0.00000</ORDBTAMT>
                <CRDTAMNT>32000.00000</CRDTAMNT>
                <ORCRDAMT>32000.00000</ORCRDAMT>
                <CURRNIDX>1007</CURRNIDX>
                <TRXSORCE></TRXSORCE>
                <POSTED>0</POSTED>
            </Distribution>
            <Payments/>
            <Holds/>
            <UserDefined/>
            <Deposit/>
            <Notes/>
            <Line>
                <SOPNUMBE>TEST01</SOPNUMBE>
                <SOPTYPE>3</SOPTYPE>
                <CMPNTSEQ>0</CMPNTSEQ>
                <LNITMSEQ>16384</LNITMSEQ>
                <ITEMNMBR>1-A3261A</ITEMNMBR>
                <ITEMDESC>Multi-Core Processor</ITEMDESC>
                <NONINVEN>0</NONINVEN>
                <DROPSHIP>0</DROPSHIP>
                <UOFM>Each</UOFM>
                <LOCNCODE>WAREHOUSE</LOCNCODE>
                <UNITCOST>16000.00000</UNITCOST>
                <ORUNTCST>16000.00000</ORUNTCST>
                <UNITPRCE>32000.00000</UNITPRCE>
                <ORUNTPRC>32000.00000</ORUNTPRC>
                <XTNDPRCE>32000.00000</XTNDPRCE>
                <OXTNDPRC>32000.00000</OXTNDPRC>
                <REMPRICE>32000.00000</REMPRICE>
                <OREPRICE>32000.00000</OREPRICE>
                <EXTDCOST>16000.00000</EXTDCOST>
                <OREXTCST>16000.00000</OREXTCST>
                <MRKDNAMT>0.00000</MRKDNAMT>
                <ORMRKDAM>0.00000</ORMRKDAM>
                <MRKDNPCT>0</MRKDNPCT>
                <MRKDNTYP>0</MRKDNTYP>
                <INVINDX>18</INVINDX>
                <CSLSINDX>137</CSLSINDX>
                <SLSINDX>113</SLSINDX>
                <MKDNINDX>128</MKDNINDX>
                <RTNSINDX>449</RTNSINDX>
                <INUSINDX>27</INUSINDX>
                <INSRINDX>18</INSRINDX>
                <DMGDINDX>141</DMGDINDX>
                <ITMTSHID></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>1.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>0.00000</EXTQTYAL>
                <EXTQTYSEL>0.00000</EXTQTYSEL>
                <ReqShipDate>2017-04-12T00:00:00</ReqShipDate>
                <FUFILDAT>2017-04-12T00:00:00</FUFILDAT>
                <ACTLSHIP>2017-04-12T00:00:00</ACTLSHIP>
                <SHIPMTHD>LOCAL DELIVERY</SHIPMTHD>
                <SALSTERR></SALSTERR>
                <SLPRSNID></SLPRSNID>
                <PRCLEVEL>RETAIL</PRCLEVEL>
                <COMMNTID></COMMNTID>
                <BRKFLD1>0</BRKFLD1>
                <BRKFLD2>0</BRKFLD2>
                <BRKFLD3>0</BRKFLD3>
                <CURRNIDX>1007</CURRNIDX>
                <TRXSORCE></TRXSORCE>
                <ORGSEQNM>0</ORGSEQNM>
                <ITEMCODE></ITEMCODE>
                <PURCHSTAT>1</PURCHSTAT>
                <DECPLQTY>1</DECPLQTY>
                <DECPLCUR>3</DECPLCUR>
                <ODECPLCU>3</ODECPLCU>
                <QTYTOSHP>0.00000</QTYTOSHP>
                <XFRSHDOC>0</XFRSHDOC>
                <EXCEPTIONALDEMAND>0</EXCEPTIONALDEMAND>
                <TAXSCHID>USASTCITY-6*</TAXSCHID>
                <TXSCHSRC>2</TXSCHSRC>
                <PRSTADCD>WAREHOUSE</PRSTADCD>
                <ShipToName>Aaron Fitz Electrical</ShipToName>
                <CNTCPRSN>Bob Fitz</CNTCPRSN>
                <ADDRESS1>11403 45 St. South</ADDRESS1>
                <ADDRESS2></ADDRESS2>
                <ADDRESS3></ADDRESS3>
                <CITY>Chicago</CITY>
                <STATE>IL</STATE>
                <ZIPCODE>60603-0776</ZIPCODE>
                <COUNTRY>USA</COUNTRY>
                <PHONE1>31255501020000</PHONE1>
                <PHONE2>31255501020000</PHONE2>
                <PHONE3></PHONE3>
                <FAXNUMBR>31255501020000</FAXNUMBR>
                <Flags>0</Flags>
                <BackoutTradeDisc>0.00000</BackoutTradeDisc>
                <OrigBackoutTradeDisc>0.00000</OrigBackoutTradeDisc>
                <GPSFOINTEGRATIONID></GPSFOINTEGRATIONID>
                <INTEGRATIONSOURCE>0</INTEGRATIONSOURCE>
                <INTEGRATIONID></INTEGRATIONID>
                <CONTNBR></CONTNBR>
                <CONTLNSEQNBR>0.00000</CONTLNSEQNBR>
                <CONTSTARTDTE>1900-01-01T00:00:00</CONTSTARTDTE>
                <CONTENDDTE>1900-01-01T00:00:00</CONTENDDTE>
                <CONTITEMNBR></CONTITEMNBR>
                <CONTSERIALNBR></CONTSERIALNBR>
                <LineTax/>
            </Line>
        </SO_Trans>
    </eConnect>
</root>

 

 

I never really knew that you could retrieve a customer from Dynamics, update something on the customer, and then update the customer in Dynamics. But you can...

There article is a complete set of sample code on how to retrieve a customer and then update a customer in .NET.

If this is new to you, please go through the example on how to retrieve a customer here:

http://dyndeveloper.com/articleview.aspx?ArticleID=172

Before doing this. That entire piece of code is used in this code.

This article will server as our place holder for code related to the Telerik ASPX GridNumericColumn

 

This article is a complete example of a PA TimeSheet entry

I doubt many people but me will run into this error. But I thought I'd document it because when trying to figure it out, I couldn't find any help for it.

I was trying to write a PA TimeSheet integration using eConnect and kept getting the error Project Accounting information for this employee does not exist

 

It seems that I'm always using the same VBA snippits in Ingetration Manager. And I always have to look them up in help, because I don't do it that often and I have .NET and SQL code in my head; VBA is a distant cousin.

Here are a few of the snippets that I use... so I can find them quicker when I need them.

 

This article describes how to set up the Payables Management Transaction destination in Integration Manager so that the payables posting account is set to a default value in Microsoft Dynamics GP. This default value is derived from one of the following windows:

  • The Vendor Maintenance window
  • The Posting Accounts Setup window

When doing a GP9 to GP 2010 upgrade, I got this error:

Msg 15148, Level 16, State 1, Procedure sp_bindefault, Line 230
The data type or table column '[eConnect_Out].[DBNAME]' does not exist or you do not have permission.

The 'more' window gave me this

 

The following SQL statement produced an error:
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[DOCTYPE]'
EXEC sp_bindefault N'[dbo].[TA_DATE]', N'[eConnect_Out].[DATE1]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[TABLENAME]'
EXEC sp_bindefault N'[dbo].[GPS_INT]', N'[eConnect_Out].[DEX_ROW_ID]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX1]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX2]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX3]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX4]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX5]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX6]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX7]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX8]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX9]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX10]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX11]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX12]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX13]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX14]'
EXEC sp_bindefault N'[dbo].[GPS_CHAR]', N'[eConnect_Out].[INDEX15]'
EXEC sp_bindefault N'[dbo].[GPS_INT]', N'[eConnect_Out].[ACTION]'
EXEC sp_bindefault N'[dbo].[GPS_INT]', N'[eConnect_Out].[REPLICATE]'
EXEC sp_bindefault N'[dbo].[TA_DBNAME]', N'[eConnect_Out].[DBNAME]'

GRANT REFERENCES , SELECT , INSERT , DELETE , UPDATE ON dbo.eConnect_Out TO DYNGRP

 

 

We're (you and I) 'early adopters'. I had Win 8 on my laptop the day it went to RTM... and I've been a little confused. Don't get me wrong... I like where they're heading. They should have done it years ago. But there is an amount to learn and memorize.

This article will cover all the things that we need to know to get up to speed on Win 8. The shortcuts, the tips. We'll update it as we find new stuff.

I'm on a machine where Dynamics has been upgraded from GP 9 to GP 2010. I'm trying to upgrade the VS Tools project. I've encountered several errors that have been very frustrating... largely because I can't find any documentation on them. I'm going to document the errors here for the community.

Type 'IDexterityAddIn' is not defined.

Could not load file or assembly 'Microsoft.Dynamics.Framework.UI.WinForms.Controls, Version=1.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Type 'Microsoft.Dexterity.Shell.UI.DexUIForm' is not defined

 

 

 

 

This article is a complete working example of the SOPDeleteLineType schema

In a recent project, we needed to

  • Get a line from a SOP document
  • Delete the line
  • Resubmit the line using the SOPTransactionType. (It allows you to submit a line only, and that will add a line to the SOP document)

This is the piece of code that we used to do step one, getting the SOP document line.

This function takes a SOP Number, Type, and Line Item Sequence as params and returns a 

Microsoft.Dynamics.GP.eConnect.Serialization.taSopLineIvcInsert_ItemsTaSopLineIvcInsert

 object. Since it's already in that form all we have to do is to edit it a little and re-submit it.

When you first log onto Dynamics GP2010, you might see a series of dialogs like the ones pictured below. This happens most frequently on terminal servers that don't already have a mail client installed.

This article will give users a series of steps to stop the wizards from popping up

 

I love my job. Something new to figure out every day.

Today we needed to find a way to make Integration Manager work with Azox Extended Pricing. The script privided below makes use of a 'Pre' script, the taSopLineIvcInsertPre. This script fires before each line is inserted in a SOP ingegration. The basic idea is that we look up the price in Azox and substitute it for the price that is in the integrations.

*** There is only about an hour of work in this script. It will not work for all situations, probably even most situations. It is intended as a starting point. You'll need to carefully test this against your data and make improvements.

This piece of code will truncate the log file size for all the databases in SQL Server 2008.

This article will show how to put a field onto a form in Dynamics GP using Modifier, and read/save data for that field in VBA

This article will add on to the video here http://dyndeveloper.com/articleview.aspx?ArticleID=27 that shows how to add a field to Dynamics GP and to read data. You'll want to review that first if you're not familiar with the technique

In this example we've added a field to the Item Maintenance form called 'Color', the code below assumes that you're already done that, and that you've added the form to VBA (again, see the video for instructions)

 

When deploying the Microsoft SQL Server Reporting Services reports for Microsoft Dynamics GP you may run into the following error message:

"The SQL Server Reporting Services setup information is not valid"

Alternatively, you might see the following error:

"You do not have security access to deploy reports to the location entered"

You could also be prompted for credentials at the time of the deployment.

There are a few common causes for these issues:

This article contains code for a trigger template.

I work for 4 or 5 customers a day on support calls, I'm coding on their system remotely; I don't have the luxury of setting up SQL Server SSMS the way that I like it and coding blissfully.

A basic task for me would be creating a trigger; but I really don't like the templates that come with SQL. 

Hi,

We have a situation regarding taxes when trying to update an existing transaction using eConnect from our integration.


The procedure is the following (using our front-end application):

The user creates a transaction and saves it.

Later he/she loads that transaction back on screen and changes the 'Taxable' field to 'No' so taxes are no longer calculated.

The user saves the transaction and when he/she loads up the transaction again the taxes are still there.


What I'm doing is:

I save the transaction using eConnect, the CREATETAXES property is set to 1.

I update the transaction using eConnect, CREATETAXES is set to 0 and UPDATEEXISTING is set to 1.


USINGHEADERLEVELTAXES is 0 at every time.


We need eConnect to remove those taxes created when the transaction was saved for the first time.

Obviously I'm doing something wrong.

Could you guide me through?


Thanks in advance!

I know if you want to create a shipment(1) or a shipment invoice(3) you use taPopRcptHdrInsert for the header.

if you have to create an invoice(2) you use taPopEnterMatchInvHdr.


What if I want to create a return(4), (5), (6), (7)?  Is there an econnect sproc for that and what is the best way to see if a screen has an econ sproc for it?


hi all,

I have developed a timesheet in Infopath i would like to use to populate time tickets in GP.  My thought is that i collect timesheets from the field, run a custom VS2010 workflow on the infopath form to extract the info and load it into GP.  Currently, my payroll guy hand-types all the paper timesheets into the system, which takes about a day and half.  I would like all our project managers to enter these tickets in one place, and have it load up in GP automatically.  My thought is that if i load up the timesheets in the system, then GP can do all the work of posting to projects and the GL....i just want to eliminate payroll from hand-entering all these timesheets.

I know there is this functionality in the SharePoint Business Portal for GP, but we decided to let me just write the whole thing.  As of now, i have the workflows done for approval, and set permissions on the library, but the one MAIN workflow still has a major peice missing: connecting to GP to load up timesheet batches.

I have never used eConnect or the web services, so i was wondering if someone could point me to a document showing how to connect to GP and load records.  I could probably do this by simply doing inserts in the timesheet tables, but i would like to follow the best practices and do it through the GP web services or eConnect.

So what would be the best way to do this and where do I start?

thanks in advance!

george

Hi everyone!

I'm trying to save a transaction using eConnect, the selected customer is on hold and eConnect crashes with this error message:

"Customer is on Hold, you must remove the Hold status to enter transactions"


But, if I try to save a transaction using the same customer in GP everything works great.


Is selling to held customers supported by the current version of eConnect?


Thanks in advance!

A long time friend send me a request to parse the first name and last name from the dataset that you see below. I'm going to post the answer that I sent, but it was kind of fun so I thought I'd post it as an exersize and to see if anyone else had a better solution. Points for any answer better than mine.  

declare @iv30102 table (itemdesc varchar(100))
insert into @iv30102 (itemdesc) values ('01/01/2010 Smith, Gabriella     WHOLESALE')
insert into @iv30102 (itemdesc) values ('01/04/2010 Farnsworth,Joe     WHOLESALE')

I am new to Modifier/VBA and have a project that requires the addition of a string field and a combo box to the Item Maintenance window and save the Item number and field values to a table (Ex. SSG_CALCOO), I would appreciate any help. 

Hi Friends,

I have a strange issue in GP 2010. All of a sudden i experienced some auto generated  GL entries which will have batch ID as GLTRX0000... and reference no SALES0001314. I am not able to find this reference document in sales transaction. Account distribution is credited to Cost of sales and Debited to inventories.

Batch comment is Cost Adjustment

 Kindly advice.

 

Regards

Rajesh