'Add as company contact' button

The 'Add to company as contact' button (1) belongs to the 'Address' form element (2) and can be edited in the Form designer only if the corresponding container of the address is active in the editor.

images/download/attachments/44929805/image2018-8-9_13_43_46-version-1-modificationdate-1572338989957-api-v2.png

Fig. 1: The 'Address' form element must be activated for the button to appear in the element selection list.

Application case

In order to use the 'Add to company as contact' button in a form, it is first necessary to configure the Firmen and Adressen form elements and create Ereignisbehandlung.

1. 'Addresses' form element

1.1. Address with correct company type

First, the element for the desired company type (2) should be dragged from the form selection list for Addresses (1) into the Form editor (3).

images/download/attachments/44929805/image2018-8-9_14_36_50-version-1-modificationdate-1572338989962-api-v2.png

Fig. 2: Selection of the form element Addresses (1) (e.g. recipient (2)).


1.2. Service configuration

Subsequently, the field for 'Search results' (1) is activated so that the Service configuration (2) can be opened.

images/download/attachments/44929805/image2018-8-9_14_44_42-version-1-modificationdate-1572338989964-api-v2.png

Fig. 3: In the 'Search results' field (1), the Service configuration (2) can be opened by clicking on it.


In the now opened Service configuration, under the Address search (1) tab, the Contact types (2) can be defined, under which the data from the container 'Address' should be stored in the contact data of a company. This configuration is then saved by clicking on the Save (3) button and the Service configuration is closed again.

images/download/attachments/44929805/image2018-8-9_14_53_13-version-1-modificationdate-1572338989967-api-v2.png

Fig. 4: In the Service configuration of the search field the Contact type (2) is set.


1.3. Add button

With selection of the 'Row layout' (1) in the Tree View it is then possible to drag the button Add to company as contact (2) into the address element (3).

images/download/attachments/44929805/image2018-8-9_15_44_19-version-1-modificationdate-1572338989972-api-v2.png

Fig. 5: Drag button into the address container.

2. 'Companies' form element

2.1. Company with correct company type

In order to be able to dynamically assign the address to be saved in a form to a specific company, a form element Firmen (1) with the same Company type as the address must now be dragged into the form (2) and configured.

images/download/attachments/44929805/image2018-8-9_15_12_13-version-1-modificationdate-1572338989969-api-v2.png

Fig. 6: Adding the Firmen element with the same Company type as the address (see 1.1).


2.2 Configure behaviour

In order to be able to assign and save a contact to a selected company in the search combobox (1), a behaviour (2) should now also be configured for this form element with the following parameters:


Parameter

Value

Behaviour name

name is freely selectable

Triggering event

changed

Change types

exclusively by the user

Behaviour type

static = true

Actions

true

Target element

Search result of the address container (3)

Action type

Use contacts of this company

►NOTE◄ The action type Use contacts of this company is available only after the 'Target element' (4) has been set!

images/download/attachments/44929805/10-08-_2018_09-08-00-version-1-modificationdate-1572338989918-api-v2.jpg

Fig. 7: Configuration of a behaviour (2) on the company element (1).

3. Event handling

In order to assign a contact to a company, event handling must also be configured.

3.1. Triggering events

images/download/attachments/44929805/13-08-_2018_14-35-59-version-1-modificationdate-1572338989929-api-v2.jpg

Fig. 8: The address action event Add address (1) is selected as the triggering event.


3.2. Validating rule

images/download/attachments/44929805/image2018-8-13_14_40_46-version-1-modificationdate-1572338989943-api-v2.png

Fig. 9: Check type (1) on Address (2).


3.3. Action on passed rule

images/download/attachments/44929805/image2018-8-13_14_45_58-version-1-modificationdate-1572338989946-api-v2.png

Fig. 10: Select the action Add company address contact.

Action configuration

images/download/attachments/44929805/13-08-_2018_15-03-17-version-1-modificationdate-1572338989933-api-v2.jpg

Fig. 11: The contact type can be selected under Static values/Any dynamic enum (1).


images/download/attachments/44929805/13-08-_2018_15-08-54-version-1-modificationdate-1572338989936-api-v2.jpg

Fig. 12: For the target company, the variable 'contactCompanyId' is resolved under Value resolver/Variable (1).


images/download/attachments/44929805/image2018-8-13_15_13_22-version-1-modificationdate-1572338989948-api-v2.png

Fig. 13: Configured action Add company address contact.


images/download/attachments/44929805/image2018-8-13_15_20_45-version-1-modificationdate-1572338989955-api-v2.png

Fig. 14: With the 'Activation' (1) under the Event handling (2) tab and the subsequent saving of this workflow process, the configurations for using the button are completed.