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

Announcements

News and Announcements icon
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

I have the same question (0)
  • Community Member Profile Picture
    on at

    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;

  • Community Member Profile Picture
    on at

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

  • Mick Egan Profile Picture
    3,561 on at

    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

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

  • Tim Wappat Profile Picture
    5,715 on at

    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

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Dan Liebl Profile Picture

Dan Liebl 2

#2
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans