Reg: unable to add site columns to content type from vs.net
Hi,
I have 2 features. Feature 1 and feature2. Feature1 contains site columns and Feature2 contains content type and site columns bind to it. 
Below is my site columns xml file .
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">  
  <Field
       ID="{8c6862e2-4237-4008-b34c-a6c4080f0701}"
       Name="col1"
       DisplayName="col 1"
       Type="Text"
       Required="FALSE"
       Group="Custom Site Columns">
  </Field>
  <Field
       ID="{23F4482A-F969-4B2E-9400-833629369477}"
       Name="col2"
       DisplayName="col 2"
       Type="Text"
       Required="FALSE"
       Group="Custom Site Columns">
  </Field>
</Elements>

Below is my content type xml file .
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <!-- Parent ContentType: Document (0x0101) -->
  <ContentType ID="0x01010056F471761E344D3DBE251C3323EB9321" Name="WordCT" Group="Custom Content Types" Description="My Content Type" Inherits="TRUE" Version="0">
    <FieldRefs>
      <FieldRef ID="{8c6862e2-4237-4008-b34c-a6c4080f0701}" DisplayName="col 1" Required="FALSE" Name="col1" />
      <FieldRef ID="{23F4482A-F969-4B2E-9400-833629369477}" DisplayName="col 2" Required="FALSE" Name="col2" />
    </FieldRefs>
  </ContentType>
</Elements>

I have deployed the wsp. I have activated Feature1 (contains site columns) first then feature2 (content type).
When I check the content type from site content types I didnt find these two columns binded to it. I didnt understand where am doing wrong,
 Any idea on what was wrong here?
July 17th, 2015 10:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics