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?


3 Answers 3


You can use the method GetItemByIdSelectedFields,

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


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


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.