Difference Between MsgGet, MessageBox, & MsgGetText PeopleCode Functions

 

MsgGet(message_set, message_num, default_msg_txt [, paramlist])

Use the MsgGet function to retrieve a message from the Message Catalog and substitutes in the values of the parameters into the text message.

You can access and update messages on Message Catalog page (select PeopleTools, Utilities, Administration, Message Catalog). You can enter message text in multiple languages. The Message Catalog also enables you to enter more detailed "Explain" text about the message. The message_set and message_num parameters specify the message to retrieve from the catalog. If the message is not found in the Message Catalog, the default message provided in default_msg_txt is used. Message sets 1 through 19,999 are reserved for use by PeopleSoft applications. Message sets 20,000 through 32,767 can be used by PeopleSoft users.

The MsgGet function retrieves a message from the PeopleCode Message Catalog and substitutes
in the values of the parameters into the text message.
Example: &MsgText = MsgGet(40000, 2, "Message not found");
MessageBox
Retrieves messages from the Message Catalog but provides the
flexibility to change the severity of a message through the Message
Catalog, without modifying PeopleCode.

MessageBox(style, title, message_set, message_num, default_txt [, paramlist])
Example: MessageBox(0, "", 40000, 1, "Message not found", BUS_EXPENSE_PER.EMPLID, BUS_EXPENSE_PER.EXPENSE_PERIOD_DT);
MsgGetText is very similar to MsgGet except the message set and message number will not appear after the text of the message.
MsgGetText(message_set, message_num, default_msg_txt [, paramlist])
Example: &MsgText = MsgGetText(40000, 2, "Message not found");
The message text is limited to a maximum of 100 characters. You can pass bind values (%1, %2, %3 ... %n) to the message text using PeopleCode functions like MsgGetMsgGetText and MessageBox. However MsgGetExplainText is to pass bind values to the explain text and not the message text.

No comments:

Post a Comment

PeopleCode to retrieve Google map between two addresses

  PeopleCode Example: /* Define constants for the API request */ Local string &origin = "123 Main St, Anytown, USA";   /* ...