Skip to main content

User Relationships - GUI

How to Create a User Association in the Desktop Application and What Is Its Purpose?

Written by Petr Pech

In Flexi, the standard link between documents refers to an automatically created link. Flexi creates this automatically when a certain process is performed on a document — for example, when creating an invoice from an order or a delivery note from an invoice. However, there are many more cases where this applies.

There may be situations where you need to link documents that are not directly related to each other by default, and you need to create a link manually (for traceability purposes). That is exactly what user-defined links are for.

The codebook of user-defined link types can be found in the Tools module under User-Defined Link Types. The link itself can be accessed on specific documents via the Links button — this covers both types: standard (automatically created by Flexi) and user-defined (manually or automatically created by the user).

For some modules, the Links button is not available — instead, a button dedicated solely to user-defined links is provided.

User-Defined Link Types

Before you can create a user-defined link, you must first define its type. A similar principle applies to documents, where each document also requires its own document type.

User-defined link types can be found in the Tools module under Codebooks, in the User-Defined Link Types section.

Open the link type codebook and explore the options for creating a new entry. As elsewhere in the application, this is done via the New button.

As soon as you open the editor for a new link type, you will see that it is divided into manually created and automatically created links. We will walk through the properties of each.

ℹ️ A link can never be created without a type — defining the link type must therefore always be the first step.

Manually Created Link

This is the first and simpler of the two options to configure. Every instance of this link is created manually — from the position of one document, you create a link to another document. Manual links can also be used outside the application via the API; see our documentation.

As an example, we will create a link between assets and a received invoice — it may happen that you classify purchased goods as assets and want to be able to look up the relevant asset from the invoice, or vice versa.

Step 1: Create the Link Type

In the user-defined link type codebook, click New. A basic configuration might look like this:

What needs to be configured:

  • Primary and secondary destination — which record the link should primarily be created from, and which record it points to

  • Optionally, visibility of the link from the secondary record as well

  • Optionally, supplementary information on the Texts and Labels tabs (used for categorizing the link type agenda), and validity restrictions on the Administration tab

Save the link type.

Step 2: Create the Link Itself

Open the links panel on the relevant received invoice and switch to the User-Defined Links tab. Click the New button to create a new link:

On the first page of the link creation wizard, select the link type you created earlier:

On the second page, select the asset to be linked to the received invoice. For other use cases, selecting the record to link follows the same approach.

Clicking Finish creates the link. It will be accessible both from the relevant invoice and from the relevant asset — allowing you to easily navigate to the linked record.

Automatically Created Link

This is the second link type, which requires more configuration. Such a link can be set up between documents where it makes logical sense and where the documents share a common binding field.

⚠️ An automatic link can only be created for a 1:N relationship — for example, issued invoice ↔ Job order (an invoice can have 1 job order, a job order can appear on N invoices). If you look at the issued invoice (FAV) register, this applies to all fields that contain an ID and a reference to another register. FAV and OBP are in an N:N relationship and therefore cannot be used.

We will demonstrate an example of an automatic link between a received invoice and a payment order line item. If you use payment orders in Flexi and add invoices to them, no link between the invoice and the payment order (or its line item) is created by default. This automatically created link will simplify the process of finding which payment order a given invoice is included in.

Step 1: Create the Link Type

In the user-defined link type codebook, click New. The link type configuration might look like this:

Meaning of the individual fields in the automatic link type configuration:

  • Display on form — the module in which the link will be visible and where linked data can be looked up (primary side of the link)

  • Data from form — the module from which the data referenced by the link is retrieved (secondary side of the link)

  • Where the following field matches the primary record — the shared binding field that connects records from both modules

In the case of a received invoice and a payment order line item, the shared binding field is the invoice itself, which is referenced in the payment order line item. The link is therefore created between the invoice and the payment order line item — not between the invoice and the payment order itself.

You can again add supplementary information (Texts, Labels) and restrict the validity of the link type on the Administration tab. Save the link type.

Step 2: The Link Is Created Automatically

The link is created automatically when the designated process is performed. In our case, this happens when an invoice is added to a payment order — the payment order automatically adds the invoice as one of its line items:

The automatically created link is visible only on the primary record — that is, in the module specified in the Display on form field. In this case, it is visible only on the received invoice:

Opening the link takes you to the payment order line items, where you can use the Payment Order column to find which payment order the line item (and therefore the invoice) belongs to:

Further examples of automatic user-defined links:

  • Issued invoice with a job order

  • Any document with an address book entry

  • Any document with a cost center or activity

  • and more

Did this answer your question?