Take the 2-minute tour ×

In my visual webpart, I want to get an item by it's id from a document library, and change it's field value. I don't want to actually read any of its field values, so I was wondering is there is a way to get an item by its id, and use a viewfields caml query to say, get this item without any fields.

Is this possible?


share|improve this question

3 Answers 3

up vote 2 down vote accepted

You can use the method GetItemByIdSelectedFields,

This method allows you to send as parameters the fields you want to receive

share|improve this answer

I don't think so. You better write a proper CAML query and specify the ID field on the Where clause.

share|improve this answer

What's wrong with the in-built SPList method for fetching the item by it's unique ID?


If it loads the default SPListItem fields it shouldn't be a concern so long as you are accessing a single item.

share|improve this answer

Your Answer


