Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.