Edit

Share via


XmlForm.UserRole Property

Definition

Gets or sets the current user of the form's role name.

public:
 abstract property System::String ^ UserRole { System::String ^ get(); void set(System::String ^ value); };
public abstract string UserRole { get; set; }
member this.UserRole : string with get, set
Public MustOverride Property UserRole As String

Property Value

The user's role name as defined in design mode with the User Roles command on the Tools menu.

Examples

In the following code example, the UserRole property is used set a variable with the role name of the current user.

string currentRole = this.UserRole; Dim currentRole As String = Me.UserRole

Remarks

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.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Applies to