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.
Removes all of the defaults set at a specified location.
Namespace: Microsoft.Office.DocumentManagement
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Syntax
'Declaration
Public Function RemoveAllFieldDefaults ( _
folder As SPFolder _
) As Boolean
'Usage
Dim instance As MetadataDefaults
Dim folder As SPFolder
Dim returnValue As Boolean
returnValue = instance.RemoveAllFieldDefaults(folder)
public bool RemoveAllFieldDefaults(
SPFolder folder
)
Parameters
folder
Type: Microsoft.SharePoint.SPFolderThe SPFolder from which to remove default values
Return Value
Type: System.Boolean
true if successful; otherwise, false
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The folder parameter is set to a null reference (Nothing in Visual Basic). The folder parameter should be a non-null SPFolder object representing a folder in the document library. (ArgumentNullException.ParamName="folder") |
Examples
SPSite site = new SPSite("http://contoso"); SPWeb web = new site.OpenWeb("/"); MetadataDefaults defaults = MetadataDefaults("/Documents", web); SPFolder folder = web.GetFolder("/Documents/AdventureWorks"); defaults.RemoveAllFieldDefaults(folder); defaults.Update();
See Also
Reference
RemoveAllFieldDefaults Overload