Share via


Hold.IsItemOnHold Method (SPListItem, Int32)

Returns a value that indicates if the item is on hold.

Namespace:  Microsoft.Office.RecordsManagement.Holds
Assembly:  Microsoft.Office.Policy (in Microsoft.Office.Policy.dll)

Syntax

'Declaration
Public Shared Function IsItemOnHold ( _
    item As SPListItem, _
    holdID As Integer _
) As Boolean
'Usage
Dim item As SPListItem
Dim holdID As Integer
Dim returnValue As Boolean

returnValue = Hold.IsItemOnHold(item, _
    holdID)
public static bool IsItemOnHold(
    SPListItem item,
    int holdID
)

Parameters

  • holdID
    Type: System.Int32

    The integer that identifies the list item that represents the hold.

Return Value

Type: System.Boolean
true if the specified document currently has the specified hold applied to it; otherwise, false. If the document has a hold applied to it other than the specified hold, this method still returns false.

Remarks

To determine if a document has any holds applied to it, use the IsItemOnHold method.

See Also

Reference

Hold Class

Hold Members

IsItemOnHold Overload

Microsoft.Office.RecordsManagement.Holds Namespace