There might be a requirement where we need to perform some action based on return value of Message Box.

For example: Save the component after user confirms by clicking Yes.

We can use below PeopleCode in Field Change Event.
&Answer = MessageBox(4, “”, 0, 0, “Please confirm if you want to Save”);
If &Answer = 6 Then
DoSave();
Else
End-If;

&Answer = 6 for response of “Yes”

&Answer = 7 for response of “No”

Advertisements