UI Definition in HTML and TypeScript: Built-In Converter

You can use MYOB's built-in converter, which transforms an MYOB Acumatica form from the Classic UI to the Modern UI. The converter parses an ASPX page of the form and generates the source files of the form in the Modern UI. These source files include a TypeScript definition and initialization of views and an HTML layout of the form.

Running the Converter

To use the Modern UI, you need to have the following setting in the appSettings section of the web.config file of the MYOB Acumatica instance: <add key="EnableSiteMapSwitchUI" value="True" />. For details on this setting, see Modern UI: General Information.

This setting also makes it possible for you to convert any form to the Modern UI on the fly by using the converter. To run the converter, you open the needed MYOB Acumatica form in the Classic UI and click Customization > Convert to Modern UI on the form title bar.

Tip: The Convert to Modern UI command is available only if the Customizer role is assigned to the user.

After you execute this command, the following files are generated:

  • views.ts, which contains declarations of all views that are used in the form
  • [SCREENID].ts, which contains the initialization of views for the form
  • [SCREENID].html, which contains the HTML layout of the form

By default, the files are saved in a ZIP archive, which you can download.

Configuring the Converter

You can modify the behavior of the converter by adjusting the px.core\ui\screenConverter tag of the web.config file of the instance, as shown in the following example.
<ui>
    <screenConverter declareViewsInViewModelFile="false" />
</ui>

You can use any of the following properties of the screenConverter tag:

  • declareViewsInViewModelFile: If you set this property to True, the converter will declare the views in the <ScreenID>.ts file instead of creation of a separate views.ts file.

  • screenConverterOutputFolder: You can use this property to specify the output folder for the generated files. The property is only used if the shouldFilesBeDownloaded property is False. By default, the output folder is FrontendSources\screen\src\screens\[FirstTwoLettersOfSCREENID]\[SCREENID].

  • usingOfPXJoinSyntaxEnabled: If you set this property to True, the system uses the recommended approach for joined fields, which uses periods. For details on the recommended approach, see Using Periods (Recommended). By default, this property is True.
  • shouldFilesBeDownloaded: If you set this property to False, the files are saved in the folder that is defined by the screenConverterOutputFolder property. By default, the shouldFilesBeDownloaded property is True and the files are saved in a ZIP archive.