Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

How to upload a xml file to SFTP server from BC Cloud

(0) ShareShare
ReportReport
Posted on by 45

I have used Azure Function to upload a xml file to SFTP Server from BC Cloud by referring the code snippet available in below URL,

https://demiliani.com/2020/03/30/dynamics-365-business-central-saas-save-a-file-to-an-sftp-server/

But I am unable to identify the libraries or dependencies to be added in VS Code in order to make the code to execute.

Can anyone suggest the steps to be followed in order to execute the code such that the xml file should be uploaded to SFTP Server from BC Cloud ?

  • Suggested answer
    Stefano Demiliani Profile Picture
    Stefano Demiliani 37,162 Most Valuable Professional on at
    RE: How to upload a xml file to SFTP server from BC Cloud

    Just for clarification on a topic asked on lots of threads here: this post

    demiliani.com/.../

    exaplains a solution that uses an Azure Functions that you can trigger from AL in order to save a file on blob storage and then send it to an SFTP server.

    Today (in BC 20) you can do the same things without using Azure Functions. BC has native support for uploading files to Azure Blob Storage via AL. Save the file here and then use Logic Apps/Power Automate to send the uploaded file to SFTP. Full low code approach in few clicks.

    If you check my latest session on Aeropa, you will find the solution.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 993 Super User 2024 Season 1 on at
    RE: How to upload a xml file to SFTP server from BC Cloud

    If you are in BC 19 or BC 20 you should use the native http client i AL to trigger your Azure function.

    Where we do this i send the xml file as http contest to my Azure function and let the Azure function handle the S-FTP part of the transaction.

    But we wrote our own Azure function we did not use the one in Demilliani's blog.

    To use the http client i AL you do not need any additional libraries or app dependencies.

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: How to upload a xml file to SFTP server from BC Cloud

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    dynamicsuser.net/.../developers

    I will open this up to the community in case they have something to add. Hopefully Stefano Demiliani can add value. 

    Thanks.

  • RE: How to upload a xml file to SFTP server from BC Cloud

    Kindly reply

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

Congratulations 2024 Spotlight Honorees!

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December!

Congratulations to our December super stars! 🥳

Get Started Blogging in the Community

Hosted or syndicated blogging is available! ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,622 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,354 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans