Wednesday, December 30, 2009

Notes field is displayed as multi text box

There is one thing about SharePoint that is very fascinating and frustrating.  No matter how much expertise you have gained or since how long you are working with SharePoint.  It always defeats you and makes you feel that there is still a lot to learn.

Today i learnt some thing really tiny and good thing about SharePoint notes field.

We had a requirement wherein we wanted to keep the record of activities that a user is performing against a list item.

We created a site column of type “Note” with “AppendOnly” set to “TRUE”.  I added it to the required content type and then to list schema in order to provision the list with a field named “Activity Notes”.

Till now everything looks good, but guess what,  when i deployed the solution and provisioned a list,  the Notes field was displayed as normal “Multi Line text box”,  on top of that it was behaving the same way and user was able to delete everything.

Where as i expected it to behave like a “Append Only” text box that shows the history of comments, (the way the Comments field behave in issue list).

Accidently i got to know that in order to “notes” field work with “append only” it is mendatory that “Versioning” is enabled in the list.

I updated the list schema to have “VersioningEnabled” set to “TRUE” and everything started working as expected.

Happy Learning….

Sudhir Kesharwani