The Custom Modal Dialog project contains an import package that provides sample code for calling a custom Aras form in a modal dialog. The sample code also shows how data can be passed from the custom form back to the calling method.
This project and the following release notes have been migrated from the old Aras Projects page.
Release | Notes |
---|---|
v2.4 | Introduced an example of opening an HTML page from a modal dialog. Tested for 11.0 SP15. |
v2.3.1 | Fixed a typo in the import package - was causing invalid AML. |
v2.3 | Added a new action/method to demonstrate how to call a dialog that can be maximized. Tested in 11 SP12, but may work in 11 SP9-11. |
v2.2 | Added field to demonstrate use of search dialog. Clicking the "Search Parameter 3" button programmatically calls the default Aras search dialog. Allows the user to search for a Part and populate the "Parameter 3" field with their selection. |
v2.1 | Removed item_info from dialog form |
v2.0 | Updated to work with the Aras 11.0 SP9+ tabbed client. |
v1.0 | First release. Though built and tested using Aras 11.0 SP7, this project may function in older releases of Aras 11.0 and Aras 10.0. |
Project | Aras |
---|---|
v2.4 | 11.0 SP15 |
v2.3.1 | 11.0 SP12 |
v2.3 | 11.0 SP12 |
v2.2 | 11.0 SP9, 11.0 SP12 |
v2.1 | 11.0 SP9 |
v2.0 | 11.0 SP9 |
v1.0 | 11.0 SP7 |
Always back up your code tree and database before applying an import package or code tree patch!
- Aras Innovator installed (version 11.0 SPx preferred)
- Aras Package Import tool
- Custom Modal Dialog import package
- Backup your code tree and store the archive in a safe place
- Navigate to your local
..\CustomModalDialog\
folder - Copy the
\Innovator\
folder - Paste this at the root of your install directory
- By default this is
C:\Program Files\Aras\Innovator\
- Backup your database and store the BAK file in a safe place.
- Open up the Aras Package Import tool.
- Enter your login credentials and click Login
- Note: You must login as root for the package import to succeed!
- Enter the package name in the TargetRelease field.
- Optional: Enter a description in the Description field.
- Enter the path to your local
..\CustomModalDialog\Import\imports.mf
file in the Manifest File field. - Select aras.labs.CustomModalDialog in the Available for Import field.
- Select Type = Merge and Mode = Thorough Mode.
- Click Import in the top left corner.
- Close the Aras Package Import tool.
You are now ready to login to Aras and try out a custom modal dialog.
- Login to Aras.
- Navigate to Design > Parts in the table of contents (TOC).
- Right click on a Part item in the main grid and select Open Custom Modal Dialog.
- Enter some text into the Parameter 1 field.
- Optional: Select the Parameter 2 checkbox.
- Optional: Click the Search Parameter 3 button and choose a Part item for the Parameter 3 field.
- Click Submit.
The modal dialog will close and an alert will appear, showing the values of param1, param2, and param3 that were returned by the modal dialog.
- Login to Aras.
- Navigate to Design > Parts in the table of contents (TOC).
- Right click on a Part item in the main grid and select Open Maximizable Modal Dialog.
- To maximize the modal dialog, click the square icon in the top right corner of the dialog. Click it again to return the dialog to its original size.
This sample uses the same form and logic as the first sample, so everything other than the resizing behavior is the same. The only difference is that the method labs_CallMaxModalDialog
calls topWnd.ArasModules.MaximazableDialog.show()
instead of the usual topWnd.ArasModules.Dialog.show()
.
- Login to Aras.
- Navigate to Design > Parts in the table of contents (TOC).
- Right click on a Part item in the main grid and select Open Custom Modal Dialog (HTML).
This sample uses a custom HTML Page instead of the Form used in the first and second sample, but the logic behind it is very similar. The dialog is still opened with topWnd.ArasModules.Dialog.show()
but instead of configuring the dialog parameters with content: ShowFormAsADialog.html
, we instead pass in the relative path to another HTML file in the code tree like content: ../customers/custom_dialog_page.html
.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
For more information on contributing to this project, another Aras Labs project, or any Aras Community project, shoot us an email at [email protected].
Created by Eli Donahue for Aras Labs.
Contributions by:
Aras Labs projects are published to Github under the MIT license. See the LICENSE file for license rights and limitations.