Edit

Share via


UserPermission.ExpirationDate Property

Definition

Gets or sets the optional expiration date for the permissions on the current form assigned to the user associated with a UserPermission object.

public:
 property System::Object ^ ExpirationDate { System::Object ^ get(); void set(System::Object ^ value); };
public object ExpirationDate { get; set; }
member this.ExpirationDate : obj with get, set
Public Property ExpirationDate As Object

Property Value

A System.DateTime that represents the expiration date for the user associated with the UserPermission object.

Examples

In the following example, a UserPermission object retrieved from the Permission collection for the current form, and then the ExpirationDate property is used to display that user's expiration date.

_XDocument3 thisDoc = (_XDocument3)thisXDocument;
UserPermission thisUser = 
   thisDoc.Permission["someone@example.com"];
thisXDocument.UI.Alert(thisUser.ExpirationDate.ToString());
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
UserPermission thisUser = 
   Permission.UserPermissions("someone@example.com")
thisXDocument.UI.Alert(thisUser.ExpirationDate.ToString())

Remarks

A UserPermission object associates a set of permissions on the current form with a single user and an optional expiration date. The ExpirationDate property gets or sets the optional expiration date of this UserPermission object using the local time zone.

Because the UserPermission 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