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'm adding here a field to the list, but it adds itself to a default content type, how can I add it to library but not to CT?

            SPFieldBoolean flagField = (SPFieldBoolean)library.Fields.CreateNewField(SPFieldType.Boolean.ToString(), "flagfield");
            flagField.DefaultValue = "0";
            library.Fields.Add(flagField);
            library.Update();
share|improve this question
1  
Do you have multiple CTs in the library? –  BlueBird Jun 25 '13 at 14:10
    
yes, it has multiple CT's and it adds to the default one, but i just want it to be added to the document library! –  Shkipper Jul 10 '13 at 13:49

1 Answer 1

up vote 0 down vote accepted

I found the answer to my question! Here is the answer.

share|improve this answer

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.