MessageBox to display messages on screen in PeopleCode

From WikiCode

Jump to: navigation, search

Objetive

Sometimes we need to display messages on screen, can be for issues warnings, indicating that lack complete information, to see the value of certain variables, etc. For these cases we use the MessageBox function.

Keep in mind that if the code is running on a page, record or component, the message will be displayed on screen, but using it within a process such as an Application Engine, the message will be written in the log file.

Syntax

MessageBox(style, title, catalog_message, number_message_catalog, default_text [,parameters] )

Examples

Suppose you are running the code of a page:

/*We indicate a catalog number and message number which do not exist to display the default message*/
MessageBox(0,"",99999,99999,"Test");
 
/* If the message and catalog exist,the description defines for this message is shown*/ 
/* If the message doesn´t exist, the default message is displayed*/
MessageBox(0,"",30000,1,"Mensaje de catalogo no encontrado");
 
/* To display the value of a variable we can use the folowing statement*/
MessageBox(0,"",99999,99999,"variable1" | &var1);
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Categories
support
Sites
Toolbox