web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Sharepoint Integration - Custom Folder structure logic using Flow no longer possible?

(0) ShareShare
ReportReport
Posted on by

Hello,

I am trying to integrate a custom logic to the way folders are structured in Sharepoint.

It's pretty simple:

- Accounts (Library)

-- Account Name

---Opportunity

---Quote

---Invoice

---etc

This is actually how the automated folder structure works if you choose "based on entity" in the management settings. However, for the sub folders in the account, the entities' schema name is used instead of the display name, which seems to be unchangeable (see https://community.dynamics.com/crm/f/117/t/261744) and is an absolute dealbreaker (even the solution publisher prefix is included in the folder name):

spfolderstructure.png

So, I decided to implement a custom logic using Flow. There's actually a few older guides out there on how to start on that. However, the option to turn off automatic folder creation in the management settings (same place where the "based on entity"-setting is) is no longer there post 9.0.

Am I just completely out of luck here? I would even be willing to write a plugin to do this (don't know C# yet, working on that).

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    No one with any experience on this?

  • Verified answer
    Kokulan Profile Picture
    18,054 on at

    Hi

    I do not think you would need to prevent the automatic folder creation for the following reason

    The automatic folder creation only happens when the user navigates to Documents tab.

    If your flow can trigger OnCreate of the record, it could create the folder structure you want. CRM will not auto-create if the record already has a document location associated.

    If you would like to have a look at how to create folder and doc loc, please see the link below

    community.dynamics.com/.../create-folder-strucutre-in-sharepoint-using-ms-flows

    Few other useful links

    community.dynamics.com/.../902507

    community.dynamics.com/.../use-microsoft-flow-to-move-notes-attachments-from-dynamics-365-to-sharepoint

    community.dynamics.com/.../flow-examples-note-attachment-to-sharepoint

  • Verified answer
    Amit007 Profile Picture
    147 on at

    Hi tom,

    If you would like to create folder inside SharePoint document library you can do this using MS Flow or using Custom workflow(C#) activity both. this is possible in both ways but MS Flow has limitation of requests/month and as i observed it also generates logs which consume more space of MS Dynamics CRM. So choice is yours what you like.

    1) Using MS Flow

    community.dynamics.com/.../flow-examples-note-attachment-to-sharepoint

    themscrmexpert.wordpress.com/.../use-microsoft-flow-to-move-notes-attachments-from-crm-to-sharepoint

    2)  Using Custom Workflow or Plugin

    www.inogic.com/.../programmatically-create-folders-and-upload-files-in-sharepoint-server-2013-through-plug-inworkflow

    code.msdn.microsoft.com/SharePoint-Integration-c5f21604

  • Community Member Profile Picture
    on at

    Thanks guys, I managed it using Flow for now with your help! It's not ideal, especially when people navigate to documents too fast after creating records, but it's adequate until I learn more about writing Plug-Ins.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    As a temporary measure you could do the following as well.

    Create the document location record in the plugin on create of the record. You can leave the relative url empty. This will prevent users from creating their own document location pointing to default structure.

    When the user clicks on documents tab it will display file not found error and once flow done it's work documents tab will work fine.

    In your flow once you created the folder in SP you can update the relative url of the doc loc.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans