Tuesday, August 28, 2012

sample SharePoint 2010 Elements.xml

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <Field ID="{2962C4A9-C298-4393-9234-EAF9CCCD8CA0}" Name="LoginName"
         Type="User" DisplayName="Login Name" StaticName="LoginName"
         Required="TRUE" UserSelectionMode="PeopleOnly" ShowField="Name" />
   <Field ID="{0C5A1104-AD4A-4048-AB08-FAF62814D54B}" Name="LoginIsActive"
         Type="Boolean" DisplayName="Active?" StaticName="LoginIsActive"
         Required="TRUE">
      <Default>1</Default>
   </Field>
   <ContentType ID="0x01004fd59ec931f9478c990051d6fe455f36"
            Name="CardHolder"
            Group="List Content Types"
            Description="CardHolder Columns"
            Inherits="FALSE"
            Version="0">
      <FieldRefs>
         <FieldRef ID="{2962C4A9-C298-4393-9234-EAF9CCCD8CA0}"
               Name="LoginName" />
         <FieldRef ID="{0C5A1104-AD4A-4048-AB08-FAF62814D54B}"
               Name="LoginIsActive" />
      </FieldRefs>
   </ContentType>
</Elements>

No comments:

Post a Comment