3.1 Account

Allows access to objects and properties associated with one of the UserIDs logged in to or proxied for by the current Application object.

3.1.1 Properties

The following table lists properties along with their access and descriptions.

Property

Access

Description

AccountProperty

R/O

String. Accepts a constant from the AccountPropertiesConstants enumeration. The returned value is a string that is filled with one of the following:

  • egwAccountPropertyDomain (String name of the GroupWise domain for the account.)

  • egwAccountPropertyPostOffice (String name of the GroupWise Post Office for the account.)

  • egwAccountPOAStillAlive (If the GroupWise POA is still responding to requests, Y. Otherwise, N.)

  • egwAccountLastError (Last known GroupWise engine error code, converted to a hexadecimal string. For example, 0xD124 if access is denied.)

AccountRights

R/O

AccountRightsCollection. Access rights given to specific users. For the root account (Proxied = FALSE), contains zero or more read/write instances of AccountRights objects, each of which grants access rights to a specific user. For a proxied account (Proxied = TRUE), contains exactly one read-only instance of the AccountRights object which specifies the rights a user has to the proxied account.

AccountUID

R/O

Returns a Unique ID (UID) for the account object. For an online connection, the UID is the email address of the account. For example, jdoe@gwpo.com. For a remote or caching connection, the UID is the email address with a unique number appended to the end. For example, jdoe@gwpo.com:1456732456.

AddressBooks

R/O

AddressBooks collection. The AddressBooks collection for the root account-even if this account is a proxy account (Proxied = TRUE).

AllFolders

R/O

Folders collection. All folders in this account. Includes shared folders even if they are owned by another user (the folder's Shared property = egwSharedIncoming).

AllMessages

R/O

AllMessages collection. All messages in this account. Does not include messages that belong to other accounts, even if they appear in this account's query folders and shared folders.

Application

R/O

Application. The Application object.

Archived

R/O

Boolean. TRUE if this is an archive account.

Cabinet

R/O

Folder. The Cabinet Folder.

Calendar

R/O

Folder. Contains the appointments, notes, and tasks stored in this account. Items stored in shared folders are not part of the Calendar folder. Items that have the OnCalendar property set to FALSE are not part of the Calendar folder.

CategoryDefinitions

R/O

CategoryDefinitions collection. The collection of Category objects defined for this account.

Checklist

R/O

Folder object. Returns an interface pointer to the Checklist folder object.

Contacts

R/O

Folder object. Returns an interface pointer to the Contacts folder object.

DefaultAccountRights

R/O

AccountRights. Default access rights given to users not listed in the AccountRights property. Only available from the root account.

DefaultAddressBook

R/W

AddressBook. Only available from the root account.

DefaultDocumentLibrary

R/O

DocumentLibrary. The default DocumentLibrary object. Can be Nothing.

DefaultPathToArchive

R/O

String. Returns the path to the archived account, if one exists.

See ArchiveSettingsFlags.

DistinguishedName

R/O

String. Returns a string with the full eDirectory Distinguished Name for the user. For example, JDoe.MyTree.MyCompany. Because the remote mode and caching mode have no connection to the Domain or Post Office databases, this property is not valid in these modes.

DocumentLibraries

R/O

DocumentLibraries collection.

DocumentsFolder

R/O

Folder. The folder containing the most recently used documents.

FieldDefinitions

R/O

FieldDefinitions collection.

Filters

R/O

Filters collection. Represents saved filters.

FrequentContacts

R/O

AddressBook. Only available from the root account. Can be Nothing, even in the root account, if the GroupWise Address Book is not installed.

GWTimeZone

R/O

The GWTimeZone object for this application.

LastBackupDate

R/W

Date. The date and time this account was last backed up. You must be logged in as a Trusted Application to set this date in SOAP.

-Caching or Remote modes. It does not work in Client/Server mode.

LastRetentionDate

R/W

Date. The date and time this account was last archived (retained) by a third-party archive program. You must be logged in as a Trusted Application to set this date in SOAP.

-Caching or Remote modes. It does not work in Client/Server mode.

MailBox

R/O

Folder. The Mailbox folder.

MoveAcceptedAppointmentsfromMailbox

R/W

Boolean. True if appointments are automatically moved to the calendar folder when accepted; FALSE otherwise.

MultiLoginAddressBookSupport

R/W

Boolean. If TRUE, accounts created by calling MultiLogin do not use MAPI address book methods to retrieve their data, which allows each MultiLogin account to see the address book data for each user. If FALSE, all accounts use the Address Book data for the first account logged into by GroupWise

ObjType

R/O

Enum (egwUser, egwResource). The type of object this account represents.

Owner

R/O

Address. The address of the owner of this account.

Parent

R/O

Application. The Application object that owns this object.

PathToArchive

R/O

String. Returns the path to the archived account, if one exists.

NOTE:The GroupWise client does not update settings until it exits. If you are running multiple clients, there is not a general purpose "settings have changed" event mechanism in place to notify other clients to reread the settings and there is no way for the Object API to receive updated settings information that is changed by a client. The best option is to have third-party products use tokens against a running client. However, if multiple clients are running for the same user and the settings change on the other client, the settings will still be incorrect for the client that the C3PO is running against.

PathToHost

R/O

String. The path-to-host of the GroupWise server that was logged in to, or an empty string ("") if the user logged in through TCP/IP.

PeekMode

R/W

Boolean. If a third-party application has accessed this account using a Trusted Application login, this flag allows the third-party application to read email messages without setting the Read flag.

Any application that created a GroupWise User account can set the PeekMode flag on that account. If PeekMode is on and you try to access the Message Body or Attachments for a specific Message, the Downloaded flag is set (and the Opened and Read flags are not automatically set).

A Trusted Application can use the Account6 interface to set the flags that are automatically set during PeekMode. You can also use this interface to ensure that no Opened, Read, or Downloaded flags are set.

PeekModeFlagConstants

R/W

Reading: Any third-party program can get the state of the PeekModeFlags and see what status flags are set when a Message object is accessed. It does not matter if PeekMode is turned ON or not. These flags are applies to all Messages. By default, this returns a bitmask with two of the enumeration values set:

  • egwPeekModeOpenedFlag

  • egwPeekModeReadFlag

Writing: Only Trusted Applications can call to change the value of the PeekMode status flags. The PeekModeFlagConstants enumeration is a bitmask, so any or all of the values can be ORed together.

Proxied

R/O

Boolean. TRUE if this is a proxy account.

ProxyAccounts

R/O

Accounts collection. The proxy accounts currently being used.

Remote

R/O

Boolean. TRUE if this is a remote account.

RootFolder

R/O

Folder. The top-level folder that contains all other folders.

Rules

R/O

Rules. A collection of the Rules defined for the account.

Sent Items

R/O

Folder object. Returns an interface pointer to the Sent Items system folder object.

Signatures

R/O

Signatures. Contains the Signature objects for a GroupWise Account object. This object is usually retrieved by calling the get_Signatures method of the Account object.

SystemAddressBook

R/O

AddressBook. Only available from the root account.

TCPIPAddress

R/O

String. The TCP/IP address of the GroupWise server that was logged in to, or an empty string ("") if the user logged in through a mapped path or a Universal Naming Convention (UNC) path.

TCPIPPort

R/O

Long. The TCP/IP port of the GroupWise server that was logged in to, or zero (0) if the user logged in through a mapped path or a UNC path.

Trash

R/O

Trash. The trash for this account.

UNCPathToDomain

R/O

String. Returns a string with the UNC Path to the Domain database for this user's account.

UsingSSL

R/O

Boolean. TRUE if this connection between the POA and client is using SSL encryption. FALSE if this connection is using regular GroupWise encryption.

VCardDisplayFlag

R/W

Boolean. TRUE if a VCard should be added to Emails sent from this account; False otherwise.

VCardPABEmailAddress

R/W

String. The email address to use inside the personal address book when generating a VCard.

VCardPABName

R/W

String. The name of the personal address bookto use when generating a VCard. Only used if VCardSource is set to VCardPABSource.

VCardSignatureFile

R/W

String. The full path to a file containing a VCard to be added to Emails sent from this account. If this string is empty and the VCardDisplayFlag is set, the GroupWise Windows Client will automaticallygenerate a VCard to send with the message.

VCardSource

R/W

VCardSourceConsistants. Points at the source that should be used to generate a VCard that is added to any sent message.

WorkFolder

R/O

Folder. The Work In Progress folder.

3.1.2 Methods

See the following methods in the GroupWise Events documentation:

String ConvertEmailAddress(String OldAddress, [EmailAddressFormatConstants Format])

Converts OldAddress into a new format specified by Format, and returns it as a string. OldAddress may be either a string or an Address. If no Format is specified, it defaults to egwEmailAddress4x.

Query CreateQuery()

Creates a new Query object. See Query.

Account GetArchiveAccount([VARIANT Path])

Returns the archive account specified by Path. If no Path is specified, returns the archive account that has been set by SetArchiveTo. If SetArchiveTo is not used, this method looks up the archive account in the database. If no archive path can be found in the database, an exception is thrown. Only available from the root account.

Folder GetFolder(String FolderID)

Returns the folder in this account with the specified FolderID.

Message GetMessage(String MessageID)

Returns the message in this account with the specified MessageID.

IMPORTANT:GetMessage does not return items from the folders that are shared with you. It does return items from folders shared with others.

QuickMessages GetQuickMessagesCollection(Date StartDate, QuickMessagesCreationConstants eHowBuildList)

Returns a QuickMessages collection object. For a list of properties available, see QuickMessage.

The eHowBuildList parameter controls which message items are included in the collection. The following values are possible for eHowBuildList:

egwNewMessages

Messages items in this account that were created or received only since the StartDate parameter are included

egwModifiedMessages

Message items in this account that have been changed only since the StartDate parameter are included

egwAllMessages

Every message item in this account is added to the QuickMessages collection, and the StartDate parameter is ignored.

The QuickMessages collection should return message items quicker than other ways (such as the AllMessages collection or querying objects with their message lists). It is very fast when returning new messages, but retrieving modified messages is somewhat slower. The slowest is to retrieve all messages from an account.

GetQuickMessagesCollection should be called only on a main account. Calling this method from a Proxy account results in an error.

Messages in a folder that have been shared do not appear in the resulting QuickMessages collection. These folders are not part of the user's database and are outside of the account.

Folder contains a similar method. However, the Account object method uses every message in the account, while the Folder object method looks through message items that are in the specified folder.

NOTE:This method does not return hidden messages. Call the GetQuickMessagesCollectionExt method to return hidden messages.

QuickMessages GetQuickMessagesCollectionExt (Date StartDate, QuickMessagesCreationConstants, eHowBuildList, BOOL bIncludeHidden)

Returns a QuickMessages collection object. The bIncludeHidden parameter dictates whether Hidden messages are included with the returned collection.

The eHowBuildList parameter controls which message items are included in the collection. The following values are possible for eHowBuildList:

egwNewMessages

Messages items in this account that were created or received only since the StartDate parameter are included

egwModifiedMessages

Message items in this account that have been changed only since the StartDate parameter are included

egwAllMessages

Every message item in this account is added to the QuickMessages collection, and the StartDate parameter is ignored.

This method should return message items more quickly than other ways (such as using the AllMessages collection and querying objects with their Message Lists). Retrieving Modified Messages is slower than returning New Messages. Retrieving All Messages from an Account is the slowest.

AddressBook GetSystemAddressBook ([VARIANT bIncludeHiddenFile])

Returns the SystemAddressBook for this account object. If the Account object was retrieved by a Trusted Application and the MultiLoginAddressBookSupport flag is TRUE, the bIncludeHiddenFile parameter is used. Otherwise, this method works as if the normal SystemAddressBook property was called.

Asking for the SystemAddressBook and then retrieving AddressBookEntries excludes entries that are marked in ConsoleOne with Visibility - None or with Visibility set for their local Post Office only.

Trusted Applications, however, can view Restricted AddressBookEntries if they call this method and set the boolean property inside the bIncludeHidden parameter to TRUE.

The bIncludeHidden parameter is option. If the parameter is not filled with a valid boolean value, the property behaves as if the parameter is set to FALSE and all hidden entries are excluded from the list.

MergeArchive(Account DestArchiveAcct)

Merges all messages from the current archive account into the archive account specified by DestArchiveAcct.

Account Proxy(VARIANT User)

Returns the proxy account specified by User. User may be either a string or an Address object. If User is a string, it represents the UserID of the desired proxy account. If User is an Address object, it represents the address of the desired proxy account.

Refresh()

Forces this Account object, and all objects and collections owned by this account, to reread property values from the message database.

SetArchiveTo([VARIANT Path])

Changes the archive path to the path specified by Path. If no Path is specified, this method will change the archive path to the archive path specified in your GroupWise preferences. Only available from the root account.

SetPassword(String OldPassword, String NewPassword)

Changes the current user's GroupWise password from OldPassword to NewPassword. If the OldPassword is not the current GroupWise password, an error will be returned. If the GroupWise account has no password, the OldPassword should be an empty string. Otherwise, an error will be returned. Another error will be returned if the user's Post Office has been set to LDAP authentication.

NOTE:GroupWise cannot change the user's NetWare, Windows, LDAP, or other passwords. GroupWise changes only the password associated with the current GroupWise database. For example, if you are logged in using a TCP/IP address (which is also called online mode), SetPassword changes the password used to login to the TCP/IP address. If you are logged in to a remote or client cache database, SetPassword will change the password used to login to this remote or client cache box. SetPassword will not synchronize an Online (master) password to a remote or client/cache database (and vice versa).

SynchronizeToRemote(String path, String masterPassword, Boolean isCache, SynchronizeConstants flags);

Performs the equivalent of the regular client's "Hit The Road" functionality. path is the desired name for the remote mailbox or the client cache mailbox. masterPassword is the password of the user's main mailbox. isCache indicates if the call is setting up regular remote or client cache.

The flags are used to specify what parts to download (see SynchronizeConstants).

SynchronizeWithMaster(SynchronizeConstants flags);

Synchronizes the user's master mailbox in remote mode. The user needs to have set up the connection to the master post office from the regular client or by using SynchronizeToRemote.

The flags specify what parts to synchronize (see SynchronizeConstants).

AcceptToFolder(Folder gwDestFolder, [string Comment],[Boolean bAllInstances]);

Accept this appointment and place it in the given destination folder. If the destination folder is not a personal folder, the mailbox folder, the calendar folder, the cabinet folder, the Work In Progress folder, or a sub-calendar folder, an error will be returned. Further, the destination folder can not be a shared folder. For example a folder shared with the user. If the optional comment is provided, it will be returned to the appointment sender. If this appointment is part of an Auto Date series and the optional bAllInstances flag is set to TRUE, all instances of this appointment will be accepted.