Compartilhar via


Hold.SetHold Method (SPListItemCollection, SPListItem, String)

Sets the items on the specified hold.

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

Syntax

'Declaration
Public Shared Function SetHold ( _
    items As SPListItemCollection, _
    hold As SPListItem, _
    comments As String _
) As Boolean
'Usage
Dim items As SPListItemCollection
Dim hold As SPListItem
Dim comments As String
Dim returnValue As Boolean

returnValue = Hold.SetHold(items, _
    hold, comments)
public static bool SetHold(
    SPListItemCollection items,
    SPListItem hold,
    string comments
)

Parameters

  • comments
    Type: System.String

    Comments about why the item was put on hold.

Return Value

Type: System.Boolean
Whether any item in the collection failed to be added to the hold.

See Also

Reference

Hold Class

Hold Members

SetHold Overload

Microsoft.Office.RecordsManagement.Holds Namespace