Announcements
Hi,
I am trying to create and save a excel/csv file to a path through code in D365. As of now, the code lets the user to download or save the file manually once after the execution. Is there any possibility to download or save the file automatically through the code. I am trying to use File and DocuFileSave classes.
Thanks,
Suren.
I agree with Nikolaos , no need to develop anything using x++ in such a scenario. power automate , logic apps helps you in such a scenarios. Take a look at using data package API , one such a example you can look in below blog post.
My first suggestion is to not develop anything, instead use something that others have already developed such as LogicApps. This is most likely cheaper since somebody already figured out all that is needed in the integration.
If you really want to invest in developing it yourself, you can search first for "d365fo x++ OneDrive". If you can't find anything, then google "c# OneDrive integration", and develop a C# library which you then use from x++ code. It's really nice to be able to benefit of all C# articles, libraries etc in D365FO.
Hi Nikolaos,
Thanks for your response. I am not getting any blog to handle the onedrive save through code. Could you please let me know if there is any blog or code handling the same?
Yes, there is a way to save it to one-drive through code. OneDrive is accessible from public internet, unlike your local folders.
Hi Blue Wang,
I have gone through the link that you have shared. Is saving the excel to One-drive is manual? Or is there any way to save it to one-drive through code?
Thanks,
Suren.
Moved to D365 Finance forum.
If you use D365 FO in cloud, there's no way how the system would be able to start writing files to your local folders. That would be a huge security issue if websites could access your computer by themselves.
But you can use an integration platform such as BizTalk, LogicApps or Recurring Integrations Scheduler (free sample app from Microsoft) to poll D365FO, fetch files and save them on local folder. This integration platform or part of it would be hosted locally on your company network on some server and that's how they would be able to access your local folders.
André Arnaud de Cal...
293,311
Super User 2025 Season 1
Martin Dráb
232,183
Most Valuable Professional
nmaenpaa
101,158
Moderator