Hold.SetHold Hold.SetHold Hold.SetHold Method

Definition

Overloads

SetHold(SPListItem, SPListItem, String) SetHold(SPListItem, SPListItem, String) SetHold(SPListItem, SPListItem, String)

Sets the item on the specified hold.

SetHold(SPListItemCollection, SPListItem, String) SetHold(SPListItemCollection, SPListItem, String) SetHold(SPListItemCollection, SPListItem, String)

Sets the items on the specified hold.

SetHold(Int32, SPListItem, String) SetHold(Int32, SPListItem, String) SetHold(Int32, SPListItem, String)

Applies the specified hold to the specified document.

SetHold(Int32, SPListItemCollection, String) SetHold(Int32, SPListItemCollection, String) SetHold(Int32, SPListItemCollection, String)

Applies the specified hold to all the specified items.

SetHold(SPListItem, SPListItem, String) SetHold(SPListItem, SPListItem, String) SetHold(SPListItem, SPListItem, String)

Sets the item on the specified hold.

public:
 static void SetHold(Microsoft::SharePoint::SPListItem ^ item, Microsoft::SharePoint::SPListItem ^ hold, System::String ^ comments);
public static void SetHold (Microsoft.SharePoint.SPListItem item, Microsoft.SharePoint.SPListItem hold, string comments);
Public Shared Sub SetHold (item As SPListItem, hold As SPListItem, comments As String)
Parameters
comments
String String String

Comments about why the item was put on hold.

SetHold(SPListItemCollection, SPListItem, String) SetHold(SPListItemCollection, SPListItem, String) SetHold(SPListItemCollection, SPListItem, String)

Sets the items on the specified hold.

public:
 static bool SetHold(Microsoft::SharePoint::SPListItemCollection ^ items, Microsoft::SharePoint::SPListItem ^ hold, System::String ^ comments);
public static bool SetHold (Microsoft.SharePoint.SPListItemCollection items, Microsoft.SharePoint.SPListItem hold, string comments);
Public Shared Function SetHold (items As SPListItemCollection, hold As SPListItem, comments As String) As Boolean
Parameters
comments
String String String

Comments about why the item was put on hold.

Returns

Whether any item in the collection failed to be added to the hold.

SetHold(Int32, SPListItem, String) SetHold(Int32, SPListItem, String) SetHold(Int32, SPListItem, String)

Warning

This API is now obsolete.

Applies the specified hold to the specified document.

public:
 static void SetHold(int holdID, Microsoft::SharePoint::SPListItem ^ item, System::String ^ comments);
[System.Obsolete("Use SetHold(item, hold, comments)")]
public static void SetHold (int holdID, Microsoft.SharePoint.SPListItem item, string comments);
Public Shared Sub SetHold (holdID As Integer, item As SPListItem, comments As String)
Parameters
holdID
Int32 Int32 Int32

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

item
SPListItem SPListItem SPListItem

The document to which you want the specified hold applied.

comments
String String String

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

SetHold(Int32, SPListItemCollection, String) SetHold(Int32, SPListItemCollection, String) SetHold(Int32, SPListItemCollection, String)

Warning

This API is now obsolete.

Applies the specified hold to all the specified items.

public:
 static bool SetHold(int holdID, Microsoft::SharePoint::SPListItemCollection ^ items, System::String ^ comments);
[System.Obsolete("Use SetHold(items, hold, comments)")]
public static bool SetHold (int holdID, Microsoft.SharePoint.SPListItemCollection items, string comments);
Public Shared Function SetHold (holdID As Integer, items As SPListItemCollection, comments As String) As Boolean
Parameters
holdID
Int32 Int32 Int32

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

items
SPListItemCollection SPListItemCollection SPListItemCollection

A collection of the list items to which you want the specified hold applied.

comments
String String String

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

Returns

A Boolean value that represents whether the hold was successfully applied to the specified items.

Applies to