MetadataNavigationSettings.SetMetadataNavigationSettings method (SPList, MetadataNavigationSettings, Boolean)
Updates the MetadataNavigationSettings for a specified SPList and then automatically adjusts the list indexing.
Namespace: Microsoft.Office.DocumentManagement.MetadataNavigation
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Shared Sub SetMetadataNavigationSettings ( _
sourceList As SPList, _
listNavSettings As MetadataNavigationSettings, _
updateListIndexing As Boolean _
)
'Usage
Dim sourceList As SPList
Dim listNavSettings As MetadataNavigationSettings
Dim updateListIndexing As BooleanMetadataNavigationSettings.SetMetadataNavigationSettings(sourceList, _
listNavSettings, updateListIndexing)
public static void SetMetadataNavigationSettings(
SPList sourceList,
MetadataNavigationSettings listNavSettings,
bool updateListIndexing
)
Parameters
sourceList
Type: Microsoft.SharePoint.SPListThe list to update settings on
listNavSettings
Type: Microsoft.Office.DocumentManagement.MetadataNavigation.MetadataNavigationSettingsNew settings to update to the list
updateListIndexing
Type: System.Booleantrue if making automatic list index changes after updating settings; otherwise, false
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | One of the input parameters is set to a null reference (Nothing in Visual Basic) |
SPException | updateListIndexing is set to true and the maximum number of list indices is reached while automatically adjusting list indexing. |
SPQueryThrottledException | updateListIndexing is set to true and the automatic index adjustment operation is throttled. |
See also
Reference
MetadataNavigationSettings class
MetadataNavigationSettings members
SetMetadataNavigationSettings overload
Microsoft.Office.DocumentManagement.MetadataNavigation namespace
GetMetadataNavigationSettings(SPWeb, Guid)
GetMetadataNavigationSettings(SPWeb, Guid, Boolean)
AddConfiguredHierarchy(MetadataNavigationHierarchy)
AddConfiguredKeyFilter(MetadataNavigationKeyFilter)
SetMetadataNavigationSettings(SPList, MetadataNavigationSettings)