Get SharePoint list by Internal Name using ECMAScript / JavaScript Object Model

Ahmed Magdy picture Ahmed Magdy · Jan 8, 2012 · Viewed 16.7k times · Source

How can I load items from a SharePoint list using its InternalName? As far as I know I can get it using either Id or Title like the following:

var clientContext = new SP.ClientContext('/News/');
var web = clientContext.get_web();
var list = web.get_lists().getById("{1DBA9283-0AFA-4FA1-9BBA-70D8D190971F}");
...

Answer

Thorsten Hans picture Thorsten Hans · Jan 8, 2012

no the CSOM only offers methods to query lists by it's Id or Title.

See http://msdn.microsoft.com/en-us/library/ee549620.aspx

The SharePoint List Schema doesn't offer InternalNames at the moment. See the Schema description http://msdn.microsoft.com/en-us/library/ms415091.aspx

Thorsten