SBX - Search With Button

SBX - Forum Post Title

download file from url and save automatically in a folder from ax 4.0

Microsoft Dynamics AX Forum

DiegoOrtiz asked a question on 9 Aug 2018 8:59 PM

Question Status

Suggested Answer

I need to download an xls file from a defined url and save it to a folder defined on the server automatically 

Reply
Martin Dráb responded on 10 Aug 2018 1:22 AM

All right, and what do you need from us?

Reply
Deepak Agarwal responded on 10 Aug 2018 6:18 AM
My Badges

Pl share more details around your question and requirement. If you are looking for saving a file from x++, you can refer below code

www.theaxapta.com/.../run-save-and-email-purchase-order.html

Reply
DiegoOrtiz responded on 10 Aug 2018 3:27 PM

I need to download a file from a link,
to do it I use the activex with activex.navigate ('url')
this code lets me download the file but I decide where to save it,
I need you not to open the window to save it in a folder,
I want the download to be automatically in a defined folder

Reply
Martin Dráb responded on 10 Aug 2018 11:08 PM
Suggested Answer

I would question whether downloading a file requires writing custom code (instead of using a download manager, for instance) and whether it's logic related to ERP.

If you think so, maybe you forgot to share some business requirements with us.

If you insist on writing code in AX, look at WebClient.DownloadFile() method. You can call it via .NET Interop from X++.

Reply
Martin Dráb responded on 10 Aug 2018 11:08 PM
Suggested Answer

I would question whether downloading a file requires writing custom code (instead of using a download manager, for instance) and whether it's logic related to ERP.

If you think so, maybe you forgot to share some business requirements with us.

If you insist on writing code in AX, look at WebClient.DownloadFile() method. You can call it via .NET Interop from X++.

Reply

SBX - Two Col Forum

SBX - Migrated JS