0

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

1
  • I am writing code to modify this not at design time , also a work flow is assigned by the client
    – shivareddy
    Sep 24, 2010 at 12:30

2 Answers 2

0

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

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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