See the following topics in this section:
When dealing with tokenized applications, it is sometimes useful to divide the available tokens into two classes:
UI tokens relate to some action on the screen. For example, the AddressBookDlg() (DTKN_ADDRBOOK) token displays the address book dialog on the screen. UI tokens usually need user intervention.
UI-less tokens produce no visible affect on the screen. For example, the PrefAdvanced (AFTKN_SET_ADV) token can programmatically set properties of a message view without having to open the message view properties dialog. UI-less tokens provide functionality without user intervention.
Tokens often require a message ID as a parameter. A message ID is a string that uniquely identifies a GroupWise message. Every message in the GroupWise account contains a message ID. Many tokens use message IDs to manipulate messages. For example, the message ID is required when you need to open a message or when you need to get attributes from a message. To open a message, the ItemOpen("39255B499091137016") (AFTKN_ITEM_OPEN) token opens the message identified by the message ID 39255B499091137016.
Message IDs are persistent. Third-party applications are free to store message IDs external to GroupWise. Note that a message will have one message ID when it is created in the GroupWise remote client, then when it is synchronized with the master mailbox, it will receive a new message ID. It should also be noted that when a third-party application stores a message ID, after long periods of time (i.e. the message has been deleted) or exceptional system events (i.e. moving the user to a new post office), a message ID may no longer be valid. In these situations, the stored message ID should be discarded.
A Message ID is a string created by GroupWise that does not have any obvious meaning in and of itself to third-party applications other than to be used as a way to uniquely identify messages. When using a message ID, the third-party application should not manipulate the message ID other than to pass the string as a parameter in a token.
The messageID structure is used only by the MAPI provider code, so it cannot be used with Object API or GroupWise Tokens.
When you create a new message in the GroupWise client, the message ID has not yet been assigned. The message ID is assigned after the user has pressed the send button and the message view has disappeared. In order to publish tokens for message views that have not yet been sent, GroupWise uses X00 as a temporary message ID for the current displayed message. This is different than the Object API where a draft message is always created with a valid message ID. Tokens do not create draft messages. Likewise, the Object API does not use the temporary X00 message ID.