Action forms
Introduction to action forms in ConSol CM
Action forms are used to display a form which the user needs to fill out when executing a contact, resource or search action. The provided data can be used to update the current object or to perform other operations which need to be implemented in the action script.
Concepts, terms and definitions
Concept |
Other terms |
Definition |
---|---|---|
contact action |
|
Action defined for persons or companies of a specific customer group |
resource action |
|
Action defined for resources of a specific resource type |
search action |
|
Action defined for the results of a detail search; can apply either to cases, or to persons or companies of a specific customer group, or to resources of a specific resource type |
Purpose and usage
Action forms are available for the following kinds of actions:
-
Cases: Search actions, see Search actions for cases
Manual actions for cases are implemented in the workflow using activities, which can have activity forms, see Activity forms.
-
Contacts: manual actions and search actions defined for persons or companies in customer groups, see Contact actions
-
Resources: manual and search actions defined for resource types, see Resource actions
Action forms can be used to link the input of certain data to an action. You can implement for example a search action to update a maintenance date in all found resources. The user can enter the new maintenance date in the form. Another example is a contact action which sends an email to the contact. The user can review the data which will be used in the email in the form before the email is sent.
Action forms can contain data fields of all objects types. They are not limited to the fields of the current object, i.e. the object from which the action is executed. This allows you to implement actions which create related objects, e.g. a contact action to create a case for the contact where the user provides basic data for the case in the action form. If the form contains fields from other object types, you need to handle the field values in the action script, see Action scripts.
If the form contains fields from the current object, the values set in the current object are shown in the form. You can decide whether the values entered in the form should be used to automatically update the current object accordingly, see Defining the binding of action forms.
Settings for action forms
The following settings are available in the Basic tab:
-
Internal name: Mandatory. The technical name of the action form.
-
Localized description: Optional. The localized description of the action form. Displayed below the name of the action in the Web Client.
The following settings are available in the Fields tab.
- Number of columns: Determines the maximum number of columns used for the fields. 0 means that there is no limit, i.e. all the fields are displayed in the same row if the Next cell option is used.
-
Assigned fields: Contains the fields which are used in the action form. The layout of the form is determined by two aspects: the order of the fields (can be modified using the arrow icons) and the position (can be determined in the selector on the right). There are three options for the position:
-
Next cell:
The field is displayed to the right of the previous field. If the defined number of columns is exceeded, the field is moved to the next row. This is the default value. -
New row:
The field is displayed in a new row. -
New row (full width):
The field is displayed in a new row and spans to whole available width. This option should be used for data structures which need a lot of space, e.g. tables.
-
The available fields can be filtered by the type of object (Cases, Contacts or Resources) or by entering the field or field group name in the search field.
Basic tasks
Using an action form
Proceed as follows to use an action form:
-
Create the action form on the page of the object type. This is Search forms for cases, Contact forms for contacts and Resource forms for resources.
-
Assign the action form to an action. This is done in the Forms tab of respective action. For cases, the actions are managed on the Search actions page, for contacts on the Contact actions page, and for resources on the Resource actions page.
-
After selecting the form, you can provide further optional settings related to the form:
-
Form condition script: Select a script which controls whether the form is shown.
-
Form prefill script: Select a script which fills the form fields with predefined values.
If the form contains fields which are filled out in the current object, i.e. the contact or resource for which the action is executed, the values from the prefill script overwrite the values from the object.
-
Required fields: Select the fields which should be required, so the user must fill them out before saving the form.
-
-
Click the Update action button to save the changes.
Advanced tasks
Setting a dynamic description for the form
You can modify the description shown above the form fields by script. Use the following code in the form prefill script to overwrite the description from the basic form data with the content of a text template:
controlForm.setCustomDescription(templateService.mergeAndInlineImages("template name", engineerService.getCurrentLocale(), ticket.name))
For CM/Track, you need to use RequestLocale.get() for retrieving the user’s locale.