get splistitem by uniqueId

Hi,

i've a simply question but i'm not abble to do this.

I've a uniqueId of a spListItem and i'd like retrieve this one.

I don't have the url of the file juste the url of the DispForm so i'm not abble to get it with url.

Thanks for your solutions

January 30th, 2014 11:25pm

Hi,

I am trying to comprehend your question.

Can you tell me how you are trying to get the splistitem, or post your code, that would help to suggest a solution.

Free Windows Admin Tool Kit Click here and download it now
January 30th, 2014 11:57pm

Hi bender1986,

I' not sure if this code is what you want:
Guid itemUniqueID = new Guid("bb49fd4e-c302-45ef-85dc-e12624423651");
SPListItem item = spliste.Items[itemUniqueID ];
You can also use SPList.GetItemByUniqueId to get SPListItem from uniqueId
SPListItem item = list.GetItemByUniqueId(new Guid("CFA9E204-6509-424B-A246-0DE5295C42B2"));
February 1st, 2014 8:58am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics