Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Using econnect to get list of sales orders?

(1) ShareShare
ReportReport
Posted on by

I am trying to use econnect to get a list of sales orders for x number of days. I followed the only examples available for Customers and I am able to get a list of customers based on their examples.

// Populate the eConnectOut XML node elements
myeConnectOut.ACTION = 1;
myeConnectOut.DOCTYPE = "Customers";
myeConnectOut.OUTPUTTYPE = 2;
myeConnectOut.INDEX1FROM = DateTime.Now.AddDays(-5).ToString();
myeConnectOut.INDEX1TO = DateTime.Now.ToString();
myeConnectOut.FORLIST = 1;

OK, so that works - Now I need to get a list of sales. I tried both "Sales" and "Orders" but neither works.

// Populate the eConnectOut XML node elements
myeConnectOut.ACTION = 1;
myeConnectOut.DOCTYPE = "Orders";
myeConnectOut.OUTPUTTYPE = 2;
myeConnectOut.INDEX1FROM = DateTime.Now.AddDays(-5).ToString();
myeConnectOut.INDEX1TO = DateTime.Now.ToString();
myeConnectOut.FORLIST = 1;

// Populate the eConnectOut XML node elements
myeConnectOut.ACTION = 1;
myeConnectOut.DOCTYPE = "Sales";
myeConnectOut.OUTPUTTYPE = 2;
myeConnectOut.INDEX1FROM = DateTime.Now.AddDays(-5).ToString();
myeConnectOut.INDEX1TO = DateTime.Now.ToString();
myeConnectOut.FORLIST = 1;

How do I get a list of sales for x number of days?

*This post is locked for comments

  • Tim Wappat Profile Picture
    5,703 on at
    RE: Using econnect to get list of sales orders?

    If you run the following SQL

    SELECT *

     FROM [dbo].[eConnect_Out_Setup]

    WHERE DOCTYPE='Customer'

    You will see the eConnect config for the requesters that are associated with the customer document type.

    Within that you probably have a "customer"  ALIAS row too.

    That row will then show what your index1 is, in this case, by default it would be INDEX1:CUSTNMBR

    The two posts below, if read will give an understanding of the way these are configured and how to make your own. This can be a headache if you are an ISV and need to ensure the config is intact after upgrades or protect the config from user tinkering... but not insurmountable.

    www.timwappat.info/.../eConnect-Requester-Documents-sourced-from-Custom-table-or-Views

    www.timwappat.info/.../Solution-to-eConnect-Requester-SOP-Transaction-trigger-not-creating-output-records

  • Community Member Profile Picture
    on at
    RE: Using econnect to get list of sales orders?

    Do you mean I have to search by SOP numbers, Order numbers or customer numbers and not search by dates?

  • Mick Egan Profile Picture
    3,561 on at
    RE: Using econnect to get list of sales orders?

    Jamess,

    I believe the DOCTYPE = "Sales_Transaction", INDEX1FROM and INDEX1TO will equal a range of SOP Numbers, and INDEX2 = 2 for Order, and 3 for Invoice.

    Mick

  • Community Member Profile Picture
    on at
    RE: Using econnect to get list of sales orders?

    I have also tried "Sales_History_Transaction" and "Sales_Transaction" and neither work.

  • Community Member Profile Picture
    on at
    RE: Using econnect to get list of sales orders?

    There was a typo in my post. Customers code is:

                   myeConnectOut.ACTION = 1;

                   myeConnectOut.DOCTYPE = "Customer";

                   myeConnectOut.OUTPUTTYPE = 2;

                   myeConnectOut.INDEX1FROM = this.custnumbr;

                   myeConnectOut.INDEX1TO = this.custnumbr;

                   myeConnectOut.FORLIST = 1;

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans