Issues with Custom List Schema and Editing Field Settings (Cannot Perform this Action)

>

Why is it that when you have a deadline looming then you have a problem which takes an age to fix?!

Well I hope that if you have the problem that I had then this post will help you fix it a bit more quickly!

Problem

The problem occurred within a custom list definition which held a lookup field. When the field settings were adjusted, using Settings->List Settings, modifying a field and clicking ok, an error message would be displayed.

“Cannot Perform this Action”

This error message fills me with dread as you have very little information to help you discover the problem.

Some background information, the field was in a custom list created from the custom list feature found in the SharePoint HIVE.

The custom list schema was updated with a unique content type and some additional fields were added. This content type was a list content type which was derived from the Item Content Type and had the ID: 0x0100[GUID]. The content type was stored inside a folder /Folder/Contacts.

Solution

The solution was found by examining other custom list schemas that I have created in the past. The difference was that mine was using a Folder and it didnt have the tag:-

<ContentTypeRef ID=”0x0120″ />

So I added this ContentTypeRef, which is the reference for the Folder content type within the <MetaData><ContentTypes> element at the top of the schema.xml file.

A redeployment of the feature with updated schema.xml updated the schema.xml file in the 12 HIVE and the issue was fixed, fields could now be edited and updated.

I hope this helps save someone a few hours!

Cheers

Simon

Thoughts? Comments about this post? Please leave them here..

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s