Edit

Share via


Permission.PolicyName Property

Definition

Gets the name of the policy that was applied to the current form.

public:
 property System::String ^ PolicyName { System::String ^ get(); };
public string PolicyName { get; }
member this.PolicyName : string
Public ReadOnly Property PolicyName As String

Property Value

The name of the policy or a default value if no policy was applied.

Examples

In the following example, the PolicyName property is used to display the description of the policy that was applied to the current form.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisXDocument.UI.Alert(thisDoc.Permission.PolicyName);
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
thisXDocument.UI.Alert(thisDoc.Permission.PolicyName)

Remarks

InfoPath supports the use of administrative permission policies which list users and groups and their form permissions.

Because the Permission object and its members are new to Microsoft InfoPath, you must cast the object returned by the thisXDocument variable to the _XDocument3 type to access this object and its members. For more information, see How to: Use Object Model Members That Are Not Compatible with InfoPath 2003.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Applies to