Modern UI Editor
Page ID: (AU201080)
You use this page to customize the original HTML and TypeScript code of a form and to automatically create the extension files that contain the customized code.
Page Toolbar and More Menu
The page toolbar includes standard buttons and page-specific buttons and commands. For the list of standard buttons, see Page Toolbar. The page-specific commands can be shown as buttons on the page toolbar, as commands on the More menu, or in both places. These commands are listed in the following table in alphabetical order.
| Button | Description |
|---|---|
| Add Field |
Opens the Add Field dialog box. This dialog box is used to create a TypeScript extension for custom fields that have been added in the backend code. |
| Add View |
Launches the Add View wizard, which is used to create a TypeScript extension for a view that has been added in the backend code. In Step 1 of the wizard, you select a view in the View Name box. In Step 2 of the wizard, you select any number of the selected view’s fields that you want to add to the extension. |
| Edit TypeScript Extension | Opens the Edit TypeScript Extension dialog box, which is used to create new custom TypeScript extensions or edit existing ones. |
| Element | Description |
|---|---|
| This dialog box has the following elements. | |
| Data View |
The data view that contains the custom field you want to add to the form. You select this data view from the drop-down list, which displays all available data views whose fields you can add to the form that you are customizing. |
| DAC |
The name of the data access class (DAC) that corresponds to the data view selected in the Data View box. The system automatically inserts this DAC. |
| Field or Display Name | A search box where you can type a string that’s part of the field or display name of the custom field that you want to add to the form. The system uses this string to filter the results in the table below it that lists the fields from the selected data view. |
| Fields table | A list of the fields from the selected data view that can be added to the form. |
| The dialog box has a table listing the fields from the selected data view that can be added to the form. You can select any number of fields from the table. If you've entered a search string, you'll see only the fields whose field or display name contains the string. | |
| Included | An unlabeled check box that you select to add the field to the form. |
| DAC | The DAC of this field. |
| Field Name | The name of the field. |
| Display Name | The display name of the field. |
| The dialog box has the following buttons. | |
| Save to Extension |
Generates a new extension or saves the changes to an existing one, and closes the dialog box. The file with the generated TypeScript extension is added to your customization project and listed on the Modern UI Files page of the Customization Project Editor. |
| Cancel |
Closes the dialog box without generating an extension or modifying an existing one. |
| Element | Description |
|---|---|
| This wizard has two steps. Step 1: View Settings has the following elements. | |
| View Name |
The view you want to add to the form you’re customizing. You select the view that you want to add from the drop-down list. |
| View Type |
The view type that corresponds to the value selected in the View Name box. The system automatically inserts this view type. |
| Display Name | The display name of the selected view, as defined in the backend code. The system automatically fills in this value. |
| DAC Name | The name of the corresponding DAC for the selected view. The system automatically fills in this value. |
| Step 1: View Settings has the following buttons. | |
| Cancel |
Closes the wizard without making any changes. |
| Prev |
Goes to the previous step. (The button is unavailable in this step.) |
| Next |
Goes to the next step. |
| Step 2: Select fields has a table with the following columns. | |
| Included | A check box that you select to add the current field to the extension. |
| DAC | The name of the DAC that corresponds to the view selected in Step 1. |
| Field Name | The name of a field that’s defined in the DAC specified in the DAC column. |
| Display Name | The display name of the field that’s specified in the Field Name column. |
| Step 2: Select fields has the following buttons. | |
| Cancel |
Closes the wizard without making any changes. |
| Prev |
Goes to the previous step. |
| Finish |
Generates a new extension or saves the changes to an existing one, and closes the wizard. |
| Element | Description |
|---|---|
| The toolbar has the following buttons. | |
| New Extension |
A button that creates a new TypeScript extension. You specify the name for the new extension in the Extension Name box and add the TypeScript code in the code editor below it. |
| Add Code Snippet |
A button that expands into a drop-down menu, which provides the following commands for adding boilerplate code to the selected TypeScript extension:
|
| The dialog box has the following box and area. | |
| Extension Name | A drop-down list that displays all the existing TypeScript extensions. You select the extension that you want to edit from this list. Note that you cannot edit system-generated extensions. |
| Code Editor |
The area where you review and edit the code for the selected extension. |
| This dialog box has the following buttons. | |
| Validate | Performs validation checks on the extension code to ensure correctness. |
| Format and Validate | Fixes the formatting of the extension code that is displayed in the code editor and performs validation checks on the extension code to ensure correctness. |
| Save Extension |
Saves the changes you have made to the extension and closes the dialog box. |
| Cancel |
Closes the dialog box without any changes. |
Element Tree
You use the element tree to browse all view classes and fields—relevant to the form being customized—in a convenient tree structure. You also use it to select a view or field and view its original TypeScript properties or add custom ones on the View or Field Customization tab.
HTML Tab
On this tab, you view and edit the HTML code of a form that you want to customize.
You can click Preview HTML Extension on the tab toolbar to view the difference between the original HTML code and the changes that you have made. You can then click Save on the page toolbar to generate an extension file or save the changes to an existing extension file.
To view the original HTML code, you click Reload Original HTML on the tab toolbar.
View or Field Customization Tab
You use the View or Field Customization tab of the Modern UI Editor page to view or customize the TypeScript properties of the view or field selected in the element tree.
You can use the Add Decorators button on the tab toolbar to add new decorators to the selected view or field and customize the corresponding properties of each decorator. Currently, the system only supports adding new decorators to the selected view or field. You cannot view and edit the properties of decorators that are already applied to the selected view or field in the original code.
You can click Delete on the tab toolbar to delete any existing customization related to the selected view or field.
After customizing the properties of the selected view or field, you click Save on the page toolbar to save the changes to a TypeScript extension; or Cancel to discard all changes.
TypeScript Tab
You use the TypeScript tab of the Modern UI Editor page to view the TypeScript code of a form that you want to customize. However, you cannot directly edit the TypeScript code on this tab. Instead, you generate a TypeScript extension by using the Add Field or Add View buttons on the page toolbar.
