You are on page 1of 2

Error : OK syntax :Error str A string containing the text of the error message.

This string should always be stored in the Message Catalog and retrieved using the MsgGet or MsgGetText funct ion. This makes translation much easier and also enables you to provide detailed Explain text about the error. The text of the error message (the str parameter), should always be stored in th e Message Catalog and retrieved using the MsgGet or MsgGetText functions. Note. If you pass a string to the Error function instead of using a Message Cata log function, the explanation text from the last call to the Message Catalog may be appended to the message. This can cause unexpected results. Use errors in FieldEdit, SaveEdit , Row select,Row delete. Warning: ok syntax :Warning str WinMessage: ok , cancel WinMessage(message [, style] [, title]) Message Catalog : The PeopleSoft message catalog is used to store errors, warnings and information messages for reuse. PeopleTools > Utilities > Administration > Message Catalog PSMSGSETDEFN - Messages group by message set (a header record really) PSMSGCATDEFN - Messages grouped by message set and number note: It is advised in PeopleBooks that PeopleSoft reserves all message sets up to 20,000 (1 to 19,999). So you should start custom message sets from 20,000 thr ough 32,767 Message Severity : Message: The message is displayed and processing continues Warning: The message is displayed and treated as a warning Error: The message is displayed and treated as an error Cancel: The message is displayed and forces a Cancel Note : please do not use WinMessage anymore. It is a deprecated PeopleSoft funct ion and you should be using MessageBox instead. Message Catalog functions: The Message Catalog functions MsgGet, MsgGetText, and MessageBox retrieve and st ore two text strings in memory: the message text and the explanation text. The MsgGetExplainText function retrieves and stores only the explanation text. MsgGet : MsgGet(message_set, message_num, default_msg_txt [, paramlist]) 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(30000, 2, "Message not found"); MsgGetText : It 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(30000, 2, "Message not found");

MessageBox: It retrieves messages from the Message Catalog but provides the flexibility to c hange the severity of a message through the Message Catalog, without modifying P eopleCode. MessageBox(style, title, message_set, message_num, default_txt [, paramlist]) Example: MessageBox(0, "", 30000, 1, "Message not found", BUS_EXPENSE_PER.EMPLID , BUS_EXPENSE_PER.EXPENSE_PERIOD_DT); MsgGetExplainText: MsgGetExplainText(message_set, message_num, default_msg_txt [, paramlist]) Displays the Description text from the message catalog. If the description not availabel it displays the default message. Style : 0 1 2 3 4 5 %MsgStyle_OK -- OK. %MsgStyle_OKCancel -- OK and Cancel. %MsgStyle_AbortRetryIgnore -- Abort, Retry, and Ignore. %MsgStyle_YesNoCancel -- Yes, No, and Cancel. %MsgStyle_YesNo -- Yes and No. %MsgStyle_RetryCancel -- Retry and Cancel.

Returns: If the style parameter is provided, WinMessage optionally returns a Number value . If the style parameter is omitted, WinMessage optionally returns a Boolean val ue: True if the OK button was clicked, otherwise it returns False. -1 %MsgResult_Warning 1 %MsgResult_OK OK 2 %MsgResult_Cancel 3 %MsgResult_Abort 4 %MsgResult_Retry 5 %MsgResult_Ignore 6 %MsgResult_Yes 7 %MsgResult_No Warning was generated. button was selected. Cancel button was selected. Abort button was selected. Retry button was selected. Ignore button was selected. Yes button was selected. No button was selected.