How to get the internal name of a column in a sharepoint list?

I was working on a SharePoint project, suddenly i got this error saying "The property or field not initialized".

I searched over net and found that the internal name of a field or column in SharePoint list might be different.

Then I searched how to know the internal name of a field in sharepoint list and found the solution.

This is a powershell command which list out all the field with their internal name.

Here is the command for powershell:

$web = Get-SPWeb http://sharepointcafe:80
$list = $web.Lists["MyListName"]
$list.fields | select Title, InternalName, Hidden, CanBeDeleted | sort title | ft -AutoSize

You might also get the internal names by client object model code.

Comments

Popular posts from this blog

CAML Query in SharePoint 2010

Calling REST APi from server side code - C#

All about SharePoint 2010 Content Type Hub

SharePoint Interview Questions and Answers

Calling ASP.Net WebMethod using jQuery AJAX