Skip to main content

Notifications

Microsoft Dynamics GP (Archived)

eConnect adding distribution to a credit memo

Posted on by 660

I'm new at eConnect.  My application needs to add some credit memos to GP. I wrote a C# test program and can post a credit memo but I'm having problems posting a distribution. I've written some code but I'm having problems assigning a a distribution to a array of distributions. I declare the array but when I try an assign a distribution to the array before assigning the array to the distribution array in the credit memo it gives me a syntax error saying the array is unassigned. below is the code. Any help would be appreciated.

      creditmemotype.taPMTransactionInsert = creditmemo;

                taPMDistribution_ItemsTaPMDistribution[] crdist;

                taPMDistribution_ItemsTaPMDistribution apdist = new taPMDistribution_ItemsTaPMDistribution();

                apdist.VCHRNMBR = "Test241";

                apdist.VENDORID = "BIGSWOIA";

                apdist.DISTTYPE = 1;

                apdist.ACTNUMST = "23200";

                apdist.CRDTAMNT = 100.00m;

                apdist.DOCTYPE = 5;

 

                crdist[0] = apdist;

               creditmemotype.taPMDistribution_Items = crdist;

 

*This post is locked for comments

  • RE: eConnect adding distribution to a credit memo

    Prashant,

    There is a Dynamics CRM Connector for Dynamics GP, that you can use to pull information back and forth between Dynamics CRM and Dynamics GP, depending on what version of CRM you're currently on, as this product is being phased out in newer versions of Dynamics CRM, as well as the support for it.

    This forum appears to be in regards to a test C# program written to use the taPMTransactionInsert procedure for eConnect, 6 years ago, so I'm not sure what information we'll get from that, but we'll see if you get any response.

    Thanks,

  • Prashnat Verma Profile Picture
    Prashnat Verma 287 on at
    RE: eConnect adding distribution to a credit memo

    Hi,

    Any update as I also need to puh data from MS CRM to GP in Payable transaction entry & have no idea on how to do it.

    Thanks in advance.

    Prashant Verma

  • Manikandan Profile Picture
    Manikandan 2,845 on at
    Re: eConnect adding distribution to a credit memo

    Hi,

    Please insert new keyword like as follows, 

    taPMDistribution_ItemsTaPMDistribution[] crdist = new  taPMDistribution_ItemsTaPMDistribution[1];

    Thanks,

  • Dean Manion Profile Picture
    Dean Manion 660 on at
    Re: eConnect adding distribution to a credit memo

    The line "taPMDistribution_ItemsTaPMDistribution[] crdist = taPMDistribution_ItemsTaPMDistribution[1];" gives a syntax error "is a type but is used as a variable" with taPMDistribution_ItemsTaPMDistribution[1] underlined.

  • Manikandan Profile Picture
    Manikandan 2,845 on at
    Re: eConnect adding distribution to a credit memo

    Hi Dean ,

    Try this

    creditmemotype.taPMTransactionInsert = creditmemo;

                  taPMDistribution_ItemsTaPMDistribution[] crdist = new taPMDistribution_ItemsTaPMDistribution[No of Distribution];

                  taPMDistribution_ItemsTaPMDistribution apdist = new taPMDistribution_ItemsTaPMDistribution();

                  apdist.VCHRNMBR = "Test241";

                  apdist.VENDORID = "BIGSWOIA";

                  apdist.DISTTYPE = 1;

                  apdist.ACTNUMST = "23200";

                  apdist.CRDTAMNT = 100.00m;

                  apdist.DOCTYPE = 5;

                  crdist[0] = apdist;

                 creditmemotype.taPMDistribution_Items = crdist;

    Thanks.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans