Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Enables or disables the assignment of DocumentId objects on the specified SPSite object.
Namespace: Microsoft.Office.DocumentManagement
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Shared Sub EnableAssignment ( _
site As SPSite, _
prefix As String, _
fEnable As Boolean, _
fScheduleAssignment As Boolean, _
fOverwriteExistingIds As Boolean, _
fDocsetCtUpdateOnly As Boolean _
)
'Usage
Dim site As SPSite
Dim prefix As String
Dim fEnable As Boolean
Dim fScheduleAssignment As Boolean
Dim fOverwriteExistingIds As Boolean
Dim fDocsetCtUpdateOnly As BooleanDocumentId.EnableAssignment(site, prefix, _
fEnable, fScheduleAssignment, fOverwriteExistingIds, _
fDocsetCtUpdateOnly)
public static void EnableAssignment(
SPSite site,
string prefix,
bool fEnable,
bool fScheduleAssignment,
bool fOverwriteExistingIds,
bool fDocsetCtUpdateOnly
)
Parameters
site
Type: Microsoft.SharePoint.SPSitetrue if it enables the assignment of DocumentId objects; otherwise false
prefix
Type: System.StringSPSite object on which to enable or disable the assignment of DocumentId object
fEnable
Type: System.Booleantrue if overwriting existing DocumentId objects is allowed; otherwise, false
fScheduleAssignment
Type: System.Booleantrue if the assignment timer job can be scheduled; othrewise, false
fOverwriteExistingIds
Type: System.BooleanString used as a prefix for a DocumentId object.
fDocsetCtUpdateOnly
Type: System.Booleantrue if the enable assignment operation applies only to Document Set content types; otherwise, false.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The SPSite object or the properties of its root SPWeb object are set to a null reference (Nothing in Visual Basic). |
InvalidOperationException | The Document ID feature is not activated on the target SPSite object. |
Remarks
Always schedules the assignment timer job, never overwrites existing Ids,applies to all content types, and sets no prefix for Ids.