Skip to main content

Cloud

Strange Error when working on custom site definition

I am working on a custom site definition and let me tell you that while it is a cool experience in CAML, it is a tedious one. My biggest problem is that the development cycle is not a quick one. When you make a change to one of your files, you have to upload them to the server and then bounce IIS. You then have to create a new site using the definition so you make sure that you’re getting all of the changes and don’t get any weird stuff happening.

While developing a custom list definition in a schema.xml file, I kept getting this error:

For the life of me I couldn’t figure out what was causing the problem. I checked and double checked everything in my schema.xml file but couldn’t find the error. I finally copied a section from another schema.xml file that I know worked to compare more closely. The problem was being caused because I had capitalized the Type attribute value.

Causing error:

<Field

Name="riskStatus"

StaticName="riskStatus"

DisplayName="$Resources:Pointbridge.PbxCustomerSite,riskStatusDisplayName;"

Sealed="TRUE"

Required="TRUE"

Type="CHOICE"

FillInChoice="FALSE"

SourceID="http://schemas.microsoft.com/sharepoint/v3">

<CHOICES>

<CHOICE>(1) New</CHOICE>

<CHOICE>(2) Reviewed</CHOICE>

<CHOICE>(3) Mitigated</CHOICE>

<CHOICE>(4) Deferred</CHOICE>

</CHOICES>

<Default>(1) New</Default>

</Field>

Not causing the error:

<Field

Name="riskStatus"

StaticName="riskStatus"

DisplayName="$Resources:Pointbridge.PbxCustomerSite,riskStatusDisplayName;"

Sealed="TRUE"

Required="TRUE"

Type="Choice"

FillInChoice="FALSE"

SourceID="http://schemas.microsoft.com/sharepoint/v3">

<CHOICES>

<CHOICE>(1) New</CHOICE>

<CHOICE>(2) Reviewed</CHOICE>

<CHOICE>(3) Mitigated</CHOICE>

<CHOICE>(4) Deferred</CHOICE>

</CHOICES>

<Default>(1) New</Default>

</Field>

Yes I know that using Intellisense might have stopped that from happening but oh well, lesson learned.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

PointBridge Blogs

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram