Skip to main content

Notifications

Business Central forum
Suggested answer

Automatically Upload File Generate from BC to One Drive

Posted on by 45
Hi Everyone,
 
I'm looking for advice on automatically upload file generated from Business Central online to One Drive. Currently I have Job Queue which will run function and generate a file which will downloaded to my local pc. What I need is after the file generate from that Job Queue, it will automatically push to One Drive.
Any insights you could share would be greatly appreciated.
 
Thank you in advance for your help!
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 71,232 Super User 2024 Season 2 on at
    Automatically Upload File Generate from BC to One Drive
  • Robby Profile Picture
    Robby 45 on at
    Automatically Upload File Generate from BC to One Drive
    Hi All,
     
    Thanks for your response. As I can see, most of all suggest using Power Automate. May I know is it will need additional cost for Power Automate licenses or it already include on Business Central / Microsoft 365 Subscription?  
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 71,232 Super User 2024 Season 2 on at
    Automatically Upload File Generate from BC to One Drive
    Hi, You can try Power Automate. Hope the following can give you some hints.
    How to export data from Business Central to a csv file with Power Automate (No customization) – JSON to csv
    How to import data from a csv file to Business Central with Power Automate (No customization) – csv to JSON
    How to automatically upload files from OneDrive to Business Central with Power Automate (No customization)
     
    Thanks.
    ZHU
  • gdrenteria Profile Picture
    gdrenteria 10,415 Most Valuable Professional on at
    Automatically Upload File Generate from BC to One Drive
    Hi
    I hope this can help you and give you some hints 
    Best
    GR
  • Suggested answer
    Automatically Upload File Generate from BC to One Drive
    Hello Robby,
     
    for that purpose, you can use the standard connection of the BC and OneDrive.
     
     
    Also, you can use Power Automate for achieving this connection and you can find a lot of material on the web about BC OneDrive connection with Power Automate.
     
    Greetings
     
     
  • Vic Vinegar Profile Picture
    Vic Vinegar 6 on at
    Automatically Upload File Generate from BC to One Drive
    I used this action to save some pdf's to Sharepoint:
    trigger OnAction()
    var
        varDoc: Record "Document Attachment";
    begin
    	varDoc.SetRange("File Name", Rec.FileName);
    	if varDoc.FindSet() then
    	repeat
    		varDoc.OpenInOneDrive("Document Sharing Intent"::Open)
    	until varDoc.Next() = 0;
    end;
     
    This saves the file to onedrive and then opens it. I couldn't actually figure out how to make the code save to a specific sharepoint folder, so used power automate for the rest

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

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,802 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,129 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,154

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans