MessageManager.AddMessage Method
The AddMessage method adds a message to the MessageManager object.
Syntax
MessageManager.AddMessage(MessageConstant, Text, MessageSet)
Parameters
-
MessageConstant
-
The message name constant, which is a string that identifies the message to add. This name must be a name that is known to the OPP component that will use the message to identify an error condition. For a list of messages and their constant names, see MessageManager Messages.
-
Text
-
The text of the message to add.
-
MessageSet
-
Optional. Designates the language name with which to associate the message. This value, if specified, must be a language name added through a previous call to AddLanguage. If this parameter is not supplied, the language specified in the MessageManager object’s DefaultLanguage property is used.
Example
The following example adds the pur_badpayment message to the MessageManager. The message associated with pur_badpayment is inserted into the _Purchase_Errors_ collection in the OrderForm if a customer has provided invalid credit card information:
Call MSCSMessageManager.AddMessage("pur_badpayment", "There was a
problem authorizing your credit. Please verify your payment information
or use a different card.", "usa")
Related Topics
© 1997-1998 Microsoft Corporation. All rights reserved.