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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

eConnect adding distribution to a credit memo

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Manikandan Profile Picture
    2,845 on at

    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.

  • Dean Manion Profile Picture
    660 on at

    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
    2,845 on at

    Hi,

    Please insert new keyword like as follows, 

    taPMDistribution_ItemsTaPMDistribution[] crdist = new  taPMDistribution_ItemsTaPMDistribution[1];

    Thanks,

  • Prashnat Verma Profile Picture
    287 on at

    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

  • Derek Albaugh Profile Picture
    Microsoft Employee on at

    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,

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
talty09 Profile Picture

talty09 2

#1
Anthony Beatty Profile Picture

Anthony Beatty 2

#3
CP04-islander Profile Picture

CP04-islander 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans