0

I can't figure out how to get the item ID of a document library from the crawled or managed properties. So I decided to get it using the item Path which return the document Url allowing to download it.

Given this path I would like to know how to get this particular document item ID. Any idea ?

3
var file = web.GetFile("FULL_FILE_URL");
var itemId = file.Item.Id;

web is the SPWeb object of the website where your file is kept.

  • It is C# code. If you can't work out the rest of it, I can try helping you. – Paul Strupeikis Dec 8 '15 at 15:46

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.