web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Transaction and Distribution Lines

(0) ShareShare
ReportReport
Posted on by

I am very new to using eConnect and sending transaction data to DGP.

I am trying to send a transaction (which I have tested ok doing) but now trying to add distribution lines to it and cannot find any c# or VB coding examples.  Can someone give me a direction to go in?

*This post is locked for comments

I have the same question (0)
  • sandipdjadhav Profile Picture
    18,306 on at

    Which transactions? SOP, POP, AP, AR etc.

    Tks

    Sandip

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    Below is the sample code for SOP distribution.

    private readonly SOPTransactionType SOPTRXTYPE;

    private readonly eConnectMethods eConnectMethod;

    var SOPTransDist = new taSopDistribution_ItemsTaSopDistribution();

    SOPTransDist.SOPNUMBE = TempTableDT.Rows[pp]["SOPNUMBE"].ToString().Trim();

    SOPTransDist.SOPTYPE = Convert.ToInt16(TempTableDT.Rows[pp]["ASOPTYPE"]);

    SOPTransDist.SEQNUMBR = Convert.ToInt16(TempTableDT.Rows[pp]["SEQNUMBR"]);

    SOPTransDist.DISTTYPE = Convert.ToInt16(TempTableDT.Rows[pp]["DISTTYPE"]);

    SOPTransDist.DistRef =TempTableDT.Rows[pp]["DistRef"].ToString();

    SOPTransDist.ACTNUMST = TempTableDT.Rows[pp]["ACTNUMST"].ToString();

    SOPTransDist.ACTINDX = Convert.ToInt16(TempTableDT.Rows[pp]["ACTINDX"]);

    SOPTransDist.DEBITAMT = Convert.ToInt16(TempTableDT.Rows[pp]["DEBITAMT"]);

    SOPTransDist.CRDTAMNT = Convert.ToInt16(TempTableDT.Rows[pp]["CRDTAMNT"]);

    SOPTransDist.CUSTNMBR = TempTableDT.Rows[pp]["CUSTNMBR"].ToString();

    SOPTransDist.RequesterTrx = Convert.ToInt16(TempTableDT.Rows[pp]["RequesterTrx"].ToString());

    SOPTransDist.USRDEFND1 = TempTableDT.Rows[pp]["USRDEFND1"].ToString();

    SOPTransDist.USRDEFND2 =TempTableDT.Rows[pp]["USRDEFND2"].ToString();

    SOPTransDist.USRDEFND3 = TempTableDT.Rows[pp]["USRDEFND3"].ToString();

    SOPTransDist.USRDEFND4 = TempTableDT.Rows[pp]["USRDEFND4"].ToString();

    SOPTransDist.USRDEFND5 = TempTableDT.Rows[pp]["USRDEFND5"].ToString();

    SOPTRXTYPE.taSopDistribution_Items = list_AD.ToArray();

    SOPTransactionType[] SOPTRX = { SOPTRXTYPE };

    var eConType = new eConnectType();

    eConType.SOPTransactionType = SOPTRX;

    var fs = new FileStream(XMLFilepath, FileMode.Create);

    var writer = new XmlTextWriter(fs, new UTF8Encoding());

    var serializer = new XmlSerializer(typeof(eConnectType));

    serializer.Serialize(writer, eConType);

    writer.Close();

    var xmlDoc = new XmlDocument();

    xmlDoc.Load(XMLFilepath);

    bool strStatus = eConnectMethod.CreateEntity(DataBaseConnectionString,xmlDoc.OuterXml);

    This code is only for Sales distribution. In above code, source data has been stored within TempTableDT (i.e. DataSet).

    For further information you can ref. econnect help documents.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans