|
![]() |
#1 |
Moderator
|
Дык хелп родной:
d.OPEN Use this function to open a dialog window. d.OPEN(String [, Variable1], ...) d Data type: dialog Once you define this variable, you can open the dialog and then use other dialog functions. String Data type: text constant or code This string contains the text you want the system to display in the window. Use a back slash (\) to start a new line. Use pound signs (#) to insert variable values into the string, Place the pound signs where you want the system to substitute the variable value. If you use @ characters instead of #, the string can be used as an indicator. In this case, use @ characters only for the string, and let the variable be an integer. The limits of the indicator are 0 and 9999 - meaning that the integer you use for updating the indicator should have a value within this range. Place a number in the part of the string where a variable value will be substituted (as, for example, #1####) in order to be able to reference this field for updating. You can update the fields using the d.UPDATE or d.INPUT functions or by letting the user edit the values. Variable1 Data type: any Use these optional parameters to specify variables for field1, field2, and so on. Comments Dialog windows opened by an object are closed when the object terminates. Dialog windows are automatically sized to hold the longest line of text and the total number of lines. Example This example shows how to use the d.OPEN function. AccountInfo := Text000 + Text001; AccNo := 5634; TotSum := 1000; d.OPEN(AccountInfo, AccNo, TotSum); // Opens a window with '#'-fields for Account no. and Total d.UPDATE(); // Update the fields d.CLOSE() Create the following text constants in the C/AL Globals window: Text Constant ENU Value Text000 'Account no. #1######,\' Text001 'shows a total of $ #2######' The system will open the dialog window and show this text: Account no. 5634 shows a total of $ 1000 This shows that the system has formatted the values of the variables AccNo and TotSum into the '#'-fields. |
|