Get list item as directed without list in SharePoint

Can someone help me get a list item by unique identifier in SharePoint without using a list? I know the unique identifier of a list item, but I have no information about List. Using the client object model, I can do the following:

using (SP.ClientContext clientContext = new SP.ClientContext(...))
{
    **SP.List list = clientContext.Web.Lists.GetById(listId);**
    SP.ListItem listItem = list.GetItemById(listItemId);
    clientContext.Load(listItem);
    clientContext.ExecuteQuery();
    ...
}

Unfortunately, in this code I use listId, but the problem is that in my task I do not know listId, I only have ListItem Guid. Since I have a unique identifier, I believe there should be a way to get this Element without any additional information.

+5
source share
1 answer
+7

All Articles