We had a requirement for creating SharePoint Folder automatically when we create a record in D365 CRM Online. We tried lot of workarounds but could not get a concrete solution

PS: The Automatic Folder creation option in Document Management settings does not actually create the folder when the record is created. It only creates when you navigate to the Documents area for the first time without asking.


Finally Thanks to the Legend – Mr. Scott Durow, we could do this with the Code that he has shared on MSDN Code Samples.

Details on the blog:

MSDN Code Samples:


What I did:

This is what I did to make it run:

  1. Create a new Class Library and add all the files from the MSDN Samples.
  2. Update the GetSecureConfig function to include the credentials of the SharePoint administrator.
  3. Deploy this assembly using the Plugin registration tool.
  4. Then you can use it as Custom workflow as also mentioned in the blog link above.


Note: Please post your comments below in case of queries/ edits.