Prefilling document metadata from URL

To make work faster and more effective for the users, the document creation dialog can be opened from a link from an external application. The link will already contain data from the external system, which will be used to prefill the document metadata. This chapter describes how to set up such a link.

The document metadata will be prefilled from data passed on in the GET parameters of the URL link. The link is created by an external application. The application opens a browser with the URL link.

The link consists of two parts: a static one and a dynamic one.

Example of the link:

https://example.com/create_docu.php

This URL link is authenticated as usual. If it is used by a user who is not logged in, the standard login procedure is run before the dialog is displayed.

The dynamic part consists of the parameters to pass on. The “&” is placed before every parameter, and “?” is placed before the folder.

Parameter 1

sid_fldr – enter the folder SID where the new document will be placed. If the sid_fldr is unknown, FormFlow will display an error.

Parameters 2–N

The metadata to prefill in the dialog. Use the metadata item name (NAME_META) as the parameter name. The metadata depends on the folder. If the link contains a metadata item not known in the folder, this parameter will be ignored. If the metadata item is not set in the link and there is a default value in the settings, the default value will be used. Conversely, if a value is set in both the link and the default configuration, the value from the link will be used.

The following metadata can be passed on in the parameters:

Name displayed in the dialog Name in URL Value

Folder SID

SID_FLDR

Document folder SID (diacritics cannot be used)

LTD preserve:

LTD_ACCEPT_DOCU

TRUE / FALSE

LTD configuration:

ID_LTD_CONF_DOCU

List value

Warrantor:

WARRANTOR_ID_GROU_DOCU

ID_GROU (e.g. 4123)

Document processor:

OFFICER_ID_USER_DOCU

ID_USER (e.g. 3951)

Status:

ID_STAT_DOCU

Code (diacritics cannot be used)

Document name:

NAME_DOCU

Name (without diacritics only)

Document class:

ID_CLAS_DOCU

Class code (diacritics cannot be used)

Document rank:

ID_RANK_DOCU

Rank code (diacritics cannot be used)

Document retention code:

SHRED_MARK_DOCU

Any character – the format is checked on save

Document validity until:

SHRED_TE_VALID_UP_TO_DOCU

The date without spaces, colon as the time separator (dd.mm.yyyy hh:ii:ss, e.g. 1.12.2017 3:55:12)

Number of years of document validity:

SHRED_TE_VALIDITY_PERIOD_DOCU

Any character – the format is checked on save

Document shredding year:

SHRED_YEAR_DOCU

Any character – the format is checked on save

Entity ID:

ID_CERT_DOCU

ID_CERT

UIN:

JID_DOCU

Any character without diacritics

Reference number:

CJ_DOCU

Any character without diacritics

Expected formats of individual metadata data types:

Metadata type Expected format

Number

1234

Date

d.m.yyyy – 1.12.2017

Date and time

dd.mm.yyyy hh:ii:ss 1.12.2017 3:55:12

Text

Text

List

List value (not displayed value)

Subject (user or group)

User or group ID

Class/rank/status

Class/rank/status code (not ID)

The general rule is not to use database IDs (except users and groups), otherwise codes are always used.

An example and expected output

https://example.com/create_docu.php?sid_fldr=DOCLI&ESX_DOCLI_DOCTYPE=1100&ESX_DOCLI_BCID=1257

This link will open the new document dialog in folder “Client documentation” (folder SID is DOCLI). The following metadata is prefilled:

  • The document type is “Loan contract” (the key for this value in the document type list is 1100).

  • The business case number will be “1257”.