Share via


Hold.SetHold Method (Int32, SPListItem, String)

NOTE: This API is now obsolete.

Applies the specified hold to the specified document.

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

Syntax

'Declaration
<ObsoleteAttribute("Use SetHold(item, hold, comments)")> _
Public Shared Sub SetHold ( _
    holdID As Integer, _
    item As SPListItem, _
    comments As String _
)
'Usage
Dim holdID As Integer
Dim item As SPListItem
Dim comments As StringHold.SetHold(holdID, item, comments)
[ObsoleteAttribute("Use SetHold(item, hold, comments)")]
public static void SetHold(
    int holdID,
    SPListItem item,
    string comments
)

Parameters

  • holdID
    Type: System.Int32

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

  • comments
    Type: System.String

    Any comment you want to write to the audit log when the hold is applied to the specified document.

See Also

Reference

Hold Class

Hold Members

SetHold Overload

Microsoft.Office.RecordsManagement.Holds Namespace