Monday, February 4, 2008

Boolean parameters in SharePoint definition files are CASE-SENSITIVE, crazy!

This is real SharePoint crap!!!

I just found out, that boolean Parameters in Definition Files (like List Definition, Content Type Definition, Site Columns Definition et cetera- in general all schema.xml definition files) are CASE SENSITIVE!

One example:
<Field
ID="{...}"
Required="True"

/>

This will not work. The Field will not be defined as required. Reasons: SharePoint understands only TRUE / FALSE values written in capital letters - everything else (including True or true) will be ignored and the default setting will be taken (in case of Required the default is false).

In make our example work:
<Field
ID="{...}"
Required="TRUE"
/>

This issue applies also to all other boolean parameters, like
Hidden="TRUE" or FROMBASETYPE="TRUE".

This is something I have never seen before... anyway - that's SharePoint!!!





No comments: