Hold.SetHold Method (Int32, SPListItemCollection, String)
NOTE: This API is now obsolete.
Applies the specified hold to all the specified items.
Namespace: Microsoft.Office.RecordsManagement.Holds
Assembly: Microsoft.Office.Policy (in Microsoft.Office.Policy.dll)
Syntax
'Declaration
<ObsoleteAttribute("Use SetHold(items, hold, comments)")> _
Public Shared Function SetHold ( _
holdID As Integer, _
items As SPListItemCollection, _
comments As String _
) As Boolean
'Usage
Dim holdID As Integer
Dim items As SPListItemCollection
Dim comments As String
Dim returnValue As Boolean
returnValue = Hold.SetHold(holdID, _
items, comments)
[ObsoleteAttribute("Use SetHold(items, hold, comments)")]
public static bool SetHold(
int holdID,
SPListItemCollection items,
string comments
)
Parameters
holdID
Type: System.Int32The integer that identifies the list item that represents the hold.
items
Type: Microsoft.SharePoint.SPListItemCollectionA collection of the list items to which you want the specified hold applied.
comments
Type: System.StringAny comment you want to write to the audit log when the hold is applied to the specified documents.
Return Value
Type: System.Boolean
A Boolean value that represents whether the hold was successfully applied to the specified items.