Thursday, January 3, 2008

Unable to delete or customize a choice field in WSS 3.0

I needed to customize the HelpDesk template that is freely downloadable from Microsoft. I discovered that it is not possible to add any choice items or even delete the column. Here's what I experienced when I clicked on:
Service Requests ==> Site Settings ==> List Settings ==> Status

You will notice that the "Delete" button is missing and no choice items can be changed.
I discovered that the choice field is sealed in the feature template itself.

Solution:

1) Open the schema.xml file located in the SharePoint 2007 12-hives directory at:

%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\HelpDeskServiceRequestsList\servicerequest

2) Search for the Status field.

<Field ID="{75AF1E7D-39F1-45db-908A-B7AD3F26531A}"

Type="Choice"

Name="Status"

DisplayName="$Resources:hlpdsk,SRStatus;"

StaticName="Status"

Required="TRUE"

Sealed="TRUE"

Format="Dropdown"

FillInChoice="FALSE"

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

>

<Default>$Resources:hlpdsk,SRStatus_Choice1;</Default>

<CHOICES>

<CHOICE>$Resources:hlpdsk,SRStatus_Choice1;</CHOICE>

<CHOICE>$Resources:hlpdsk,SRStatus_Choice2;</CHOICE>

<CHOICE>$Resources:hlpdsk,SRStatus_Choice3;</CHOICE>

<CHOICE>$Resources:hlpdsk,SRStatus_Choice4;</CHOICE>

</CHOICES>

</Field>

3) Change the Sealed attribute value from TRUE to FALSE

4) Save the schema.xml file

5) Restart IIS

No comments:

Post a Comment