This topic has not yet been rated - Rate this topic

SPList.GetItemByIdAllFields Method

Returns the list item with the specified identifier (ID).

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public SPListItem GetItemByIdAllFields(
	int id
)

Parameters

id
Type: System.Int32
The ID of the item. The value of this parameter does not correspond to the index of the item within the collection of items for the list, but to the value of the ID property of the list item.

Return Value

Type: Microsoft.SharePoint.SPListItem
The list item.

This method retrieves data for all fields of the specified item, which can have a significant impact on performance. To retrieve the data for only some fields, call the GetItemByIdSelectedFields(Int32, String[]) method with the desired fields.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.