Friday, November 13, 2009

change default column name 'Title ' in Item content type - Ankit

There is a file called FldEdit.aspx in layouts folder which contains a
javascript function as shown below

function doesFieldNameConflict( strName )
{
if (g_FieldName[strName.toLowerCase()] &&
strName.toLowerCase() != <
%SPHttpUtility.AddQuote(SPHttpUtility.EcmaScriptStringLiteralEncode(spField.Title),Response.Output);
%>.toLowerCase())
return true;
else
return false;
}

g_FieldName : Its an array collection of all possible fields...
Just modify the function to add your own logic and by passing the
check for existence of "Title" field as shown below


function doesFieldNameConflict( strName )
{
if( strName.toLowerCase() == "title")
return false;
if (g_FieldName[strName.toLowerCase()] &&
strName.toLowerCase() != <
%SPHttpUtility.AddQuote(SPHttpUtility.EcmaScriptStringLiteralEncode(spField.Title),Response.Output);
%>.toLowerCase())
return true;
else
return false;
}


I tried this method, and problem is resolved like this, dont forget to remove that 2 line once it get resolved.

follow this post : http://www.eggheadcafe.com/software/aspnet/29904441/change-default-column-nam.aspx