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 :
Finance | Project Operations, Human Resources, ...
Answered

Export data to excel automatically at equal interval of time

(1) ShareShare
ReportReport
Posted on by 166
Hi Everyone,

I have a requirement where I have to export Sales table and Sales Line records for Few particular orders to excel sheet. This export of records from Sales table and sales Line to excel sheets for each should be automated twice in a day at 12 hours of interval. Can anyone please guide me how can I achieve this. 

Thank You!!!
I have the same question (0)
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    How will you identify the orders which you want to export?

    Which version of AX are you using? If applicable to your version, do you already have a suitable data entity/entities?
  • Apratim Profile Picture
    166 on at
    Hi Martin,

    Thankyou so much for replying!

     
    I have a flag in sales table which I'll update after a sales order is exported to excel through code. 

    I searched online, and found few links where Data entity was not getting used in this process but yes they were all manual not automatic.

    Thanks!!!
  • André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at
    Hi Apratim,

    Please answer the question from Martin about the exact Dynamics AX version. That determines how to answer your question.
  • Apratim Profile Picture
    166 on at
    Hi Andre,

    Thanks !
  • Apratim Profile Picture
    166 on at
    Hi Martin, 

    I'm using this AX version :  
    Installed product version : 10.0.35 (10.0.1627.138)Installed platform version : Update59 (7.0.6972.170)

    Thanks!!!
  • Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    Moved from Dynamics AX forum.
     
    Sales orders and sales order lines are two tables. How do you want to export them to Excel? To two separate files? To a single table where all header fields are repeated on all lines from the same header? Or somehow else?
     
    You can't start designing a solution without having some idea about the required output. But don't restrict yourself too early if users don't have strong business requirements; you could unnecessarily force yourself to a more difficult solution than needed.
  • Suggested answer
    AR-01121610-0 Profile Picture
    4,967 Moderator on at
    Hy Apratim,
    you can do that Export using Data management framework.
     
    Just create a data export project, insert the two entities ((1) SO Header and SO Line).
    Then set a filter (2) for each of the two lines to filter only the few related Sales Orders.
     
     
    When all the filters are set use "export in batch" (3) to setup a bazch and assign the desired recurrancy.
     
     
    You will see each run of the batch in data project job exection history and you can download the created files as a package or as Excel with in the execution details form.
     
     
    When you need to provide the files on a specific local folder or share you to automate this e.g. with Power Automate.
     
    Hope this helps.
     
    Herzliche Grüße / kind regards,
     
    Andreas Raithel
    D365FO Solution Architect
     
     
  • Apratim Profile Picture
    166 on at
    Hi Martin,

    I want to export Sales header and Sales line into two different Excel File!
     
    Thanks!

     
  • Raj Borad Profile Picture
    1,428 on at
    Hi Apratim,
     
    As per my knowledge, for your solution for getting few particular orders, you need to develop the class and run it as a batch job.
    Using this you can be able to add the format of Excel and export only the required columns from the Sales Table and Sales Line based on some conditions.
     
    Thanks,
    Raj Borad.
     
     
     
  • Apratim Profile Picture
    166 on at
    Hi Andreas,

    Thankyou for the reply!
     
    I know that we can Export using Data management framework. But the reason why want to achieve this technically through code is that I can't consider those sales order in this export which are already exported earlier.

    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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans