Geeks With Blogs
Michael Van Cleave Traveling the technical world, learning the language

Well, I am back again to just make sure that all of you SharePoint developers are not wasting your time. I am not quite sure if this has been posted before or not, but I found it impressive enough to blog about it.

So here is the lead up. I am working on a great new project that requires me to create some Site Columns and Content Types using a SharePoint feature. Well I have a couple of Site Columns that need to be Rich Text multiline text areas. So in an element manifest file, you would type in something like this.

 

    <Field ID="{GUID}"

         Name ="ShortDescription"

         DisplayName="Short Description"

         Type="Note"

         RichText="true"

         RichTextMode="Compatible"

         Sortable="false"/>

 

So I did that and deployed and enabled the feature, but when I went to the site columns list to verify that my CAML was correct and the column was created as a multiline Rich Text field. Well, low and behold it wasn't. It was still listed as Plain Text.

 

Plain Text Setting

 

Notice that I really want the selection to be Rich Text.

So, I went back to my CAML and found that everything looks right. I decided to take Ted Pattison's advise and do some detective work. I created the what column I wanted then used the object model to pull the field from a list to see what the CAML looked like. Low and behold it was the same…. EXCEPT…

    <Field ID="{GUID}"

         Name ="ShortDescription"

         DisplayName="Short Description"

         Type="Note"

         RichText="TRUE"

         RichTextMode="Compatible"

         Sortable="false"/>

The RichText Property was set to all uppercase true. I updated my CAML and Bingo.

 

Rich Text Screen

 

Just in case it hasn't set in yet. It seems that the true value for this specific property in CAML is case sensitive. Not sure why. I have played around with a few of the properties and it doesn't seem to affect them, but the testing was not very specific and not overly conclusive.

 

Hope this helps you get past the issue faster than I did.

Michael.

Posted on Monday, November 12, 2007 9:09 PM SharePoint , General Ramblings | Back to top


Comments on this post: When TRUE is not true

# re: When TRUE is not true
Requesting Gravatar...
Thanks for this very helpfull post.
Left by Sebi on Jun 15, 2009 2:19 PM

# re: When TRUE is not true
Requesting Gravatar...
Thanks, I am glad that it was helpful.

Michael
Left by Michael on Jun 15, 2009 4:41 PM

Your comment:
 (will show your gravatar)


Copyright © Michael Van Cleave | Powered by: GeeksWithBlogs.net