0

how to obtain the list name through cross-domain CSOM Provided that I have the list GUID. Any easy way for the conversion ?

  • 1
    Would you share your code please. I think you need to make some ajax calls for that. – Niranjan Kulkarni Nov 2 '15 at 7:47
0

You can get a list name from SharePoint using CSOM using below mentioned code.

using System;
using Microsoft.SharePoint.Client;
using SP = Microsoft.SharePoint.Client;

namespace Microsoft.SDK.SharePointServices.Samples
{
    class RetrieveAllListProperties
    {
        static void Main()
        {
            string siteUrl = "http://MyServer/sites/MySiteCollection";

            ClientContext clientContext = new ClientContext(siteUrl);
            Web oWebsite = clientContext.Web;
            ListCollection collList = oWebsite.Lists;

            clientContext.Load(collList);

            clientContext.ExecuteQuery();

            foreach (SP.List oList in collList)
            {
                Console.WriteLine("Title: {0} Created: {1}", oList.Title, oList.Created.ToString());
            }
        }
    }
}

If you are working with cross domain environment than you must have to use JavaScript. You can get idea from Complete basic operations using JavaScript library code in SharePoint 2013

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.