Whenever I am trying to rename the title field in Sharepoint list, instead of renaming the field it creates another field with display name Title and Internal name as Title1. Here is my code:

SPList splist = spWeb.Lists["listName"];
spWeb.AllowUnsafeUpdates = true;
var field = splist.Fields[SPBuiltInFieldId.Title];
field.Title = "Last Name";
spWeb.AllowUnsafeUpdates = false;

For SP2010/07, the internal name of Title cannot be modified, yet you can change displayname for Title.

use field.DisplayName = "Last Name"

Here, the internal name is Title and display name is "Last Name".

  • DisplayName property does not exists. To change the display name field.Title is used – DRS May 21 '15 at 5:59
  • Since field is of type var, DisplayName cannot exists, it should be SPlistitem – Shiva May 21 '15 at 6:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.