Save file to Sharepoint

Hello All,

Is there any way or a piece of code by which i can save my File to Sharepoint site.

Version - Dynamics 365 for Operations.

Thanks in advance

Where is your SharePoint? On premises? Installed in Azure VM? Or are you using SharePoint Online? Have you considered using Document Management instead of writing it by yourself?

Hello Martin,

We are using Sharepoint online and we need to save file to sharepoint using code.
Actually the requirement is we are reading the XML file from FTP, parsing in D365 and we need to archive that XML file to Sharepoint folder and all this process needs to be done through code.

We are able to parse XML and process it in D365 but we are stucked at archiving it to Sharepoint. We are using below code for archiving.

Microsoft.Dynamics.AX.Framework.FileManagement.SharePointDocumentStorageProvider storageProvider =
new Microsoft.Dynamics.AX.Framework.FileManagement.SharePointDocumentStorageProvider(host, “/Quality/SitePages/”,“Shared Documents/ArchiveTest”,extId);

This is just a piece of code we are trying to achieve our result.

If you have any other better option , please do suggest.

“needs to be done through code” isn’t not a business requirement. You’re limiting your options if you ignore all other solutions, such us utilizing Logic Apps.

Regarding your code, unfortunately I don’t see any description of what problem you have with it.