danbord
danbord

Reputation: 4076

SharePoint 2010 ClientObjectModel : Find Item by GUID

I have a list of 6000 listitem GUIDs. I need to check if each item still exist on the Web.

Previously, I was using the SPWeb.GetFile(GUID) method to check the item.

But now I need to convert that process usinig the ClientObjectModel. I cannot find a way to retrieve the item using the GUID.

I even tried from the "List" object. And can't find a way to retrieve the item from its GUID neither.

Please help! :(

Upvotes: 0

Views: 568

Answers (1)

Alexandru Deliu
Alexandru Deliu

Reputation: 556

Try to use CAML Query.

Ex CAML Query:

<Query><Where><Eq><FieldRef Name='ID'/><Value type='Counter'>"+fileIDtoFind+"</Value></Eq></Where></Query>

For more details see: http://msdn.microsoft.com/en-us/library/ie/ee857094.aspx

Upvotes: 2

Related Questions