Friday, September 19, 2008

I pulled a newbie yesterday

Well I thought that I had seen it all when it comes to quirky things in MOSS 2007 but again it always seems to find a way to throw me for a loop.

I was in the process of creating a custom content type. I based it off of the "Item" content type. I wanted to change the column from "Title" to "Client Name". Usually this is pretty standard when working with normal columns, simply click on the column name, change it and save. But when it comes to Content Types it's a whole new ball game. Since content types are simply a collection of site columns once your mage a change, everything changes…

Here is what I started with:

(Figure 1). You will notice that I have the OOTB System "Title" and a bunch of custom Site Columns below. I figured I could just simply change the name of "Title" to "Client Name" and be on my merry way…

Figure 1

So when I clicked on the title column I was presented with the following screen:

(Figure 2). I saw that there was a link to Edit Site Column in new window so I said heck why not.

Figure 2

I change the column to "Client Name" and everything was golden until I looked at another list and noticed that all columns that were based off of my Item Content type now had Client Name instead of Title… Well duhhh of course it did… So now I felt like a complete Newbie and had to go back and fix it before anyone had noticed. Sure it was only for that Sandbox Site Collection but still not very smart… So I went back to the custom content type and click on the column client name and was simply going to change it back to "Title" like nothing had changed… Well um yea that's not going to work because of course sharepoint things that that column is reserved and in use… Of course it does… So I when googling around and found this gem of a site:

In this thread a person a year ago did the same thing that I did… The solution was to navigate to the Change Site Column Page for "Title" _layouts/FldEdit.aspx and save the page as a Web Page Complete file down to your local hard drive. Then Open up that .html file and look for the following: "doesFieldNameConflict".

Then delete:

if (doesFieldNameConflict(DisplayName))

return false;

Save it and then open up the HTML file > change the name back to "Title" and click on "OK". IT WORKED!!!!

So if you are ever in this situation you now have a way of getting out of your Newbie mistake.

No comments: