Creates a dialog box that prompts the user for a yes or no
answer. The dialog box is centered on the screen for you.
|
Ok := Dialog.CONFIRM(String [, Default] [, Value1] ,...)
|
Parameters
- String
-
Type: Code or text constant
Specifies the string that is displayed in the dialog box. Use a
backslash (\) to indicate a new line. The string can be a text
constant that is enabled for multilanguage functionality. For more
information, see Working with
Multilanguage Functionality.
- Default
-
Type: Boolean
Specifies the default button. If you do not specify a default,
then No is used as the default.
Property Value/Return Value
Type: Boolean
true if you entered Yes; otherwise, false.
This return parameter reflects the user's selection.
Remarks
Example
In the following example, the Dialog.CONFIRM function
prompts the user for a Yes or No answer. This code
example requires that you create the following variables.
Name |
Data type |
Question
|
Text
|
Answer
|
Boolean
|
This code example requires that you create the
following text constants in the C/AL Globals window.
Name |
ConstValue |
Text000
|
Leave without saving changes?
|
Text001
|
You selected %1.
|
|
Copy Code |
Question := Text000;
Answer := Dialog.CONFIRM(Question, TRUE);
MESSAGE(Text001, Answer);
|
See Also