Condividi tramite


SPList.GetItemByUniqueId Method

Gets the list item by GUID.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Function GetItemByUniqueId ( _
    uniqueId As Guid _
) As SPListItem
'Usage
Dim instance As SPList
Dim uniqueId As Guid
Dim returnValue As SPListItem

returnValue = instance.GetItemByUniqueId(uniqueId)
public SPListItem GetItemByUniqueId(
    Guid uniqueId
)

Parameters

  • uniqueId
    Type: System.Guid

    The GUID of the list item.

Return Value

Type: Microsoft.SharePoint.SPListItem
The list item.

Exceptions

Exception Condition
ArgumentException

The list item does not exist.

-or-

The list is not a user information list.

See Also

Reference

SPList Class

SPList Members

Microsoft.SharePoint Namespace