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

Please help me urgent..!

I have the following content types

ShareDoc Document
Program or Project Folder
Secure Folder
Folder

I am creating nested folder in sharepoint document library in my project. Problem: I created one folder name is "Test" and content type "Program or Project".If i create a subFolder , the content type of subFolder is "Program or Project".Becuase it is taking default parent content type.But i want to change the content type to "Folder".Please give me solution to reslove it.

Regards, Shiva Reddy.P

share|improve this question
    
I am writing code to modify this not at design time , also a work flow is assigned by the client –  shivareddy Sep 24 '10 at 12:30
add comment

2 Answers 2

Laura Rogers has a blog post about using different folder content types to display views, perhaps this may help you in setting up the subFolder's content type...

http://www.sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=71

share|improve this answer
add comment
up vote 0 down vote accepted

This got resloved.

Previous Code:

Dim CurContentFolder As SPFolder = rootFolder.SubFolders.Add (ObjectsChars.assign_mapchar2objects(folderPathSplit(DocLibCount))) CurContentFolder.Item(SPBuiltInFieldId.ContentTypeId) = curWeb.ContentTypes("Folder").Id CurContentFolder.Item.SystemUpdate()

Modifed Code:

Dim CurContentFolder As SPFolder = rootFolder.SubFolders.Add(ObjectsChars.assign_mapchar2objects(folderPathSplit(DocLibCount))) Dim newItem As SPListItem = CurContentFolder.Item newItem("Content Type") = "Folder" newItem.UpdateOverwriteVersion() newItem.SystemUpdate()

Thanks for all to help Me. Shiva Reddy.P

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.