tags:

views:

49

answers:

2

I have this feature

<?xml version="1.0" encoding="utf-8"?>
<Feature  Id="c54f20d8-1ad1-49b8-aff7-2c874dd2f45a"
          Title="MyCompany Content Types"
          Description="Content Types required for MyCompany Provided Applications and Functionality"
         Version="12.0.0.0"
         Hidden="FALSE"
         Scope="Site"
         DefaultResourceFile="core"
         xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
  <ElementManifests>
   <ElementManifest Location="siteColumns.xml"/>    
 </ElementManifests>
</Feature>

Here is the contents of siteColumns.xml

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/"&gt;
  <Field
     ID="{1F343F02-22D9-45b8-A2A8-CEB2619A28C4}"
     Name="AllowSubstDelivery"
     DisplayName="AllowSubstDelivery"
    Type="Boolean"
    Format="TRUE"
    Group="MyCustomGroup"
  />
 </Elements>

The feature installs and activates, without producing an error, but the siteColumn is nowhere to be found, any ideas why this site column is not visible?

I checked the logs, no errors reported either.

+1  A: 

Hmmm... it looks like you have done everything correctly. Did you copy and paste the ID for the Field from anywhere? If so, the ID may already be in use causing your Field provision to be ignored.

I find the best way to create a Feature defining Site Columns and Content Types is to prototype everything using the Web interface and then copy and paste the generated CAML into your Visual Studio projects. I recorded a short video demonstrating the process that you may find valuable.

SharePoint Site Columns and Content Types via a Feature

Rob Windsor
Without a doubt Rob, the most Useful video I have ever seen on SharePoint. If you have any more videos , please share the links, I would be very interested to watch more.
JL
A: 

What does Format="TRUE" mean?

Doesn't look like it's according to documentation.

Field Element Documentation doesn't tell you much about those properties, however there is much in common with FieldRef element and it has documentation about Format attribute.

Maybe you wanted to use DefaultValue attribute?

Janis Veinbergs