Choose your path Increase your proficiency with the Dynamics 365 applications that you already use and learn more about the apps that interest you. Up your game with a learning path tailored to today's Dynamics 365 masterminds and designed to prepare you for industry-recognized Microsoft certifications.
Visit Microsoft Learn
2020 release wave 1Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 TimelineWatch the 2020 Release Wave 1 virtual launch event
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I am trying to integrate a custom logic to the way folders are structured in Sharepoint.
It's pretty simple:
- Accounts (Library)
-- Account Name
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):
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).
No one with any experience on this?
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
Few other useful links
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
2) Using Custom Workflow or Plugin
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.
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.
Business Applications communities