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.
Provides the policy ID for the PolicyLabel objects.
Inheritance Hierarchy
System.Object
Microsoft.Office.RecordsManagement.PolicyFeatures.PolicyLabel
Namespace: Microsoft.Office.RecordsManagement.PolicyFeatures
Assembly: Microsoft.Office.Policy (in Microsoft.Office.Policy.dll)
Syntax
'Declaration
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public Class PolicyLabel _
Implements IPolicyFeature
'Usage
Dim instance As PolicyLabel
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public class PolicyLabel : IPolicyFeature
Examples
The following code example shows how to get a policy item's CustomData property. This example contains a chunk of XML that has information you can use to implement SharePoint information management features.
using Microsoft.Office.RecordsManagement.InformationPolicy;
using (SPSite site = new SPSite(documentUrl))
{
using (SPWeb web = site.OpenWeb())
{
SPFile docFile = web.GetFile(documentUrl);
Policy docPolicy = Policy.GetPolicy(docFile.Item.ContentType);
PolicyItem docPolicyItem = docPolicy.Items["Microsoft.Office.RecordsManagement.PolicyFeatures.PolicyLabel"];
return docPolicyItem.CustomData;
}
}
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.