DocumentId.EnableAssignment Method (SPSite, Boolean)

Enables or disables the ability to assign DocumentId to a SPSite object.

Namespace:  Microsoft.Office.DocumentManagement
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)

Syntax

'Declaration
Public Shared Sub EnableAssignment ( _
    site As SPSite, _
    fEnable As Boolean _
)
'Usage
Dim site As SPSite
Dim fEnable As BooleanDocumentId.EnableAssignment(site, fEnable)
public static void EnableAssignment(
    SPSite site,
    bool fEnable
)

Parameters

Exceptions

Exception Condition
ArgumentException

SPSite object or its root SPWeb object properties are set to a null reference (Nothing in Visual Basic).

InvalidOperationException

The Document ID feature is not activated for the target SPSite object.

Remarks

This overload of the EnableAssignment() method always schedules the assignment timer job, never overwrites existing Ids,applies to all content types and sets no prefix for Ids.

See Also

Reference

DocumentId Class

DocumentId Members

EnableAssignment Overload

Microsoft.Office.DocumentManagement Namespace

IsAssignmentEnabled(SPSite)