Messagebox Peoplecode
How to use messagebox peoplecode in Peoplesoft. You can Messagebox in PeopleCode event and use an application engine that shows in view log/trace.
This syntax
MessageBox(style,title,message_set, message_num,default_txt [, paramlist])
Returns either a Number value or a constant.
Value | Constant | Meaning |
-1 | %MsgResult_Warning | Warning was generated. |
1 | %MsgResult_OK | OK button was selected. |
2 | %MsgResult_Cancel | Cancel button was selected. |
3 | %MsgResult_Abort | Abort button was selected. |
4 | %MsgResult_Retry | Retry button was selected. |
5 | %MsgResult_Ignore | Ignore button was selected. |
6 | %MsgResult_Yes | Yes button was selected. |
7 | %MsgResult_No | No button was selected. |
Example 1. Use button in style OK/ Cancel
&result = MessageBox(1, “Confirm OK / Cancel”, 0, 0, “Confirm OK / Cancel”);
rem WinMessage(%MsgResult_OK, 0);
If &result = %MsgResult_OK Then
WinMessage(“OK”, 0);
/* — each statment in peoplecode–*/
Else
WinMessage(“Cancel”, 0);
/* — each statment in peoplecode–*/
End-If;
Description of example 1
The PeopleCode &result = MessageBox(1, “Confirm OK / Cancel”, 0, 0, “Confirm OK / Cancel”); shows image below
If you press the OK button then shows an image below
Ref : https://docs.oracle.com/cd/E28394_01/pt852pbh1/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm%2337ee99c9453fb39_ef90c_10c791ddc07__3ce0