SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use a Microsoft Sharepoint 2010 document library to manage documents in Microsoft CRM 2011. CRM can automatically create folders in a Sharepoint document library when user creates an entity like Opportuniny. So far so good, but I want to automatically create some subfolders in the folder created by the CRM. The subfolders are the same for all Opportuninties. What should I do?

share|improve this question
up vote 0 down vote accepted

As long as custom code is an option, you could use an event receiver on the ItemAdded event for the list - by making use of the SPListItem.Folder property you could check to see if the item is a folder and, if so, create sub-folders for it.

However, this gets trickier since the same ItemAdded event will fire when you add those sub-folders too - you'll have to do something like check the URL of the folder to see where it is within the library's folder structure.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.