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:

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:

The following settings are available in the Fields tab.

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.