Modal actions are used to create or update other records from within the record you are currently working on. The action offers more flexibility in constructing record layouts with minimal clutter, and in breaking complex workflows into smaller pieces. For example, Modal actions are often used to store optional fields that otherwise do not need to be on the default record layout.
When a Modal action runs, typically through an action button, it opens a pop-up modal window that contains fields where you can enter or edit information about a separate record. You can use this action to create new records, or simply edit existing ones, all without leaving the current record form. For example, when working with a Contract record, you might need to upload a file as a related Attachment record. When you finish selecting a type, adding a title, and saving the file, you're still working in the Contract record, where you can select the new attachment right away.
Create a Modal Action
You can access the Actions wizard in several ways, but the easiest is to select Setup [Table] from the table where you wish to create the action. For Modal actions, you will choose the table that the Modal action button runs from, instead of the table that the Modal action creates or edits records in.
- From the top nav bar, select Setup [Table] from the bottom of the table's drop-down list.
- Select the Actions tab in the Table wizard.
- Click Modal Action.
- On the General tab, give the action a name and description.
- Select the Modal Type to either edit the current record or create a new record.
- If you choose to create a new record, select the table where the new record is created.
- On the Details tab:
- Enter the text that appears in the header of the modal window.
- If you want to include instructional text, enter that here.
Select items in the Available fields list and use the arrow button to move them to the Selected fields list. Only the selected fields appear in the modal window.
Modal actions don't support history fields, action buttons, links to multiple fields with multiple values enabled, or fields that contain embedded tables.
- Enter the text you want to show on the Save and Cancel buttons at the bottom of the modal. Often, Save and Cancel are self-explanatory, but sometimes it can be helpful to use different terms that relate to the rest of the workflow.
- Select the behavior for the Cancel button. You can either stop the save and revert all changes, or ignore all the changes made in the modal, but continue saving the record.
- If you chose to create a new record, and you want to create a link between the new record and the record the user was editing, select a linked field from the drop-down list. This linked field is populated with the ID of the new record when the record is created.
- Select or clear the "Make all fields required" checkbox. This setting overrides the settings of the individual fields you selected to add to the modal.
- Click Finish.
Now you have a functional Modal action available in the table. In most cases, you'll want to create Action Buttons for each Modal action you create, so you can add the buttons to the record layout and users can click them to trigger the action.
Modal actions cannot run from inside a rule.