Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Need to create OneDrive folders for all existing records in Dynamics 365

Posted on by Microsoft Employee

Hi

I have OneDrive and Dynamics 365 integrated using SharePoint. I have over 1000+ records in Opportunity but the folder for recrods in OneDrive does not exist until I upload a document from app. I have documents for all opportunities and I want to copy those documents in OneDrive.

I can go to opportunity and upload a document and then the OneDrive folder is created and I can copy rest of files in the folder but its too lengthy process. Is there some more easily doable way?

Thanks for any help in advance :-)

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to create OneDrive folders for all existing records in Dynamics 365

    Hi naveedkamran ,

    you can achieve your goal making crm do the task, however you need to pass through sdk.

    You need to (by sdk):

    1) retrieve all attachments related to opportunity (object type code 3)

    2) loop all attachments

    3) create an identical attachment

    4) delete current attachment

    Doing so, crm will create the new folder on SharePoint.

    Please let me know if you solve.

    If you found the answer helpful, please mark as Verified 

    Join my network on LinkedIn      Follow me on Twitter 

    Thank You & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to create OneDrive folders for all existing records in Dynamics 365

    No this is not what I want. In short I want a One Drive folders to be created automatically from Dynamics CRM entities.

  • Syed Ibrahim Profile Picture
    Syed Ibrahim 6,257 on at
    RE: Need to create OneDrive folders for all existing records in Dynamics 365

    Yes we can write some batch job by using the sdk available. Pls follow the below link for more info

    github.com/.../onedrive-sdk-csharp

    https://stackoverflow.com/questions/24812357/c-sharp-login-and-upload-to-onedrive-without-user-interaction

    Hope this helps. Pls mark it as Answered/Verified to close the thread if suggestion resolved your query

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans