Book Contents

Book Index

Web K2

Web K2, as its name suggests, is a web application that gives you access to the data and functions of the K2 ERP system from anywhere and at any time. It requires internet access to work. Thanks to this, it works on any device, from mobile phones, tablets, laptops and desktop computers to readers in the warehouse.

All modifications that the user makes via Web K2, whether changes to records, creation of new ones or deletion of existing ones, are immediately written to the K2 database and are thus immediately available in the full K2 client and from other devices.

Book Contents

Book Index

Tested operating systems and browsers

Operating system\Browser

Google Chrome

Safari

Windows 11

119.0+

-

Android 13+

119.0+

-

iOS 17+

-

17.0+

Book Contents

Book Index

K2 user login in the browser

After Web K2 is started in the browser via the internet address at which the application is installed, a login window is displayed to the user. The user logs in with their Name and Password.

pic_5196_2024

Picture: Web K2 login window

Two-factor authentication

Two-factor authentication is a modern function for securing logins to Web K2. Setting up this option significantly increases your security and the data will be better protected against attacks. This function uses two mutually independent factors for authentication, which use different communication paths.

Authentication is therefore based on two phases (factors):

  1. Entering the user name and password.
  2. Confirming the login on a mobile device.

A prerequisite for using two-factor authentication is the installation of the K2 web services server. A company that wants to apply this security policy must have purchased a licence for this product. The second prerequisite is the installation of the K2 Assist application on the relevant mobile device. The application is available for both the Android and iOS platforms. The web services server is then used to communicate with the K2 Assist mobile application to authenticate the user.

Two-factor authentication will be required for Web K2 that is not set up as internal.

The K2 API must be accessible from the internet for communication with the Firebase platform. At the same time, the company must also have created a project on the Firebase platform within its Google account. The data from this project must then be entered into IS K2. The procedure for creating the project is given in the chapter Setting up the Firebase service.

Device registration

The two-factor authentication function is intended exclusively for Web K2 and works on the principle of verification via a mobile application. In the first phase, the user must therefore download and install the K2 Assist application on their mobile device.

Furthermore, the mobile device must be registered. We do this at the first login using this function. After the name and password are entered, a QR code is displayed, which contains the access data to IS K2 set on the contact person linked to the given user.

pic_5220

Picture: QR code for logging in to IS K2

We then scan this QR code using the K2 Assist application by clicking the Scan button there.

pic_5221

Picture: The Scan option in the K2 Assist application

After the QR code is scanned, the user is logged in to Web K2, and at the same time information that the device is registered appears in the K2 Assist application on the screen of the mobile device. At this point, the mobile device and the IS K2 user account are linked. Two-factor authentication is set up for the given user.

pic_5222

Picture: Device registration

If the registration is successful, this device is added to the user's list of devices in IS K2. This list can be found in the notification system settings on the Recipients and devices tab. The Contact person linked to the logged-in user is listed here as an item.

pic_5227_2024

Picture: Notification settings - Recipients and devices tab

When we click this item, a form is displayed in which the Device tab lists all registered devices of the given user. After a device is registered for two-factor authentication, the function adds an item here with Firebase in the Device type column. When this item is opened, it also has the Two Factor Auth flag set for identification.

pic_6998_2024

Picture: List of the user's registered devices

A device of the Firebase type is intended for two-factor authentication. This is important e.g. if the user has to register a new device. In this case, it is enough to delete the item of the Firebase type from this list. Subsequently, at the first attempt to log in to IS K2, the QR code for device registration is displayed again.

The second way to immediately invoke a new device registration, e.g. when a new mobile device needs to be used, is via a function available in the Users book.

pic_5229

Picture: Button for running the mobile device registration function

Clicking the Register mobile device button displays the QR code for user registration. In this way, the registration of a mobile device can be enforced.

Multiple K2 instances can be registered in the K2 Assist application. This function is currently available only on devices with the Android operating system.

pic_107549

Picture: List of registered K2 instances

By clicking any instance in the list, the user can rename or remove it. A custom name makes it easier to find your way when logging in and when working with notifications.

pic_107550

Picture: Management options for a registered K2

Notifications from different K2 instances are displayed together in the notification centre. Each notification is labelled with the name of the relevant instance - so the user immediately knows which K2 the notification came from.

pic_1703695

Picture: Notifications from the individual registered K2 instances

User login using two-factor authentication

Each login to Web K2 using two-factor authentication proceeds as follows: after entering the internet address and filling in the login name and password, a window is displayed with information about continuing on the mobile device.

pic_5223

Picture: Information about confirming the login on the mobile device

At the same time, a notification to confirm the login to the system is sent to the mobile device.

To receive the notification on the mobile device:

Otherwise, the notification may not be received on the mobile device and access to Web K2 will therefore not be granted.

pic_5224

Picture: Notification for confirming the login

When we click this notification, detailed information about the ongoing login is displayed within the K2 Assist application on the mobile device.

pic_5225

Picture: Detailed information about the ongoing login

Description of fields:

User name

Name of the user who is currently logging in to Web K2.

Browser

The browser in which Web K2 is running.

Operating system

Version of the operating system.

IP address

IP address of the computer on which the user is currently logging in to Web K2.

Pressing the Log in button logs the user in to Web K2. The user must also confirm this login using the security feature of the mobile device (fingerprint, gesture or PIN code).

Subsequently, a screen is displayed in the K2 Assist mobile application informing the user about the successful login and the need to continue in the K2 system.

pic_5226

Picture: Information about the user login to Web K2

Multiple K2 instances can now be registered in the K2 Assist application. When confirming the login, the user is shown the selected K2 from which the notification originates. Support for multiple K2 instances is currently available only for devices with the Android operating system.

pic_107549

Picture: List of registered K2 instances

By clicking the selected K2, the user can rename it or remove it from the list.

pic_107550

Picture: Options of the selected K2

Book Contents

Book Index

Login using a PIN code and NFC (internal Web K2)

A PIN code or NFC can also be used to log in to the internal Web K2. This login is disabled by default and needs to be set up.

This login is only possible with internal Web K2 with an application server for internal use.

The option to log in using NFC or a PIN must be set up in the Web K2 installation folder, in the \K2HTMLWebClient\k2-web-layer section, in the AppServerConfig.json file, and by entering the parameter for the internal application server in the k2.ini file.

The following buttons can then be used on the login screen:

pic_1238i

Switches the start screen, and a PIN code can be entered to log in to the internal Web K2.

pic_1239i

Switches the screen, and a chip or card can be used to log in to the internal Web K2.

pic_1240i

Switches to the start screen of the internal Web K2.

pic_7871_2025

Picture: Web K2 start login screen

pic_7869_2025

Picture: Login screen for entering a PIN code

pic_7870_2025

Picture: Login screen for presenting a chip or card

Login using a PIN code and NFC is set up in the Administrator - Users section on the Quick login tab.

To display only the login screen for logging in with a PIN, the DefaultLoginType=1 parameter can be entered in the URL address. To display the NFC login screen by default, we enter the URL parameter DefaultLoginType=2. The use of URL parameters is described here.

Book Contents

Book Index

Login using a URL parameter

It is also possible to log in to Web K2 using a URL parameter. This function allows users to log in to the system using a string that is part of the URL address.

Security warning

The function represents a potential security threat because the string is visible in the URL address. We recommend using this function only in local networks and on devices such as TVs and all-in-one displays that run in full-screen mode. In this mode, the URL address is not visible, so the string cannot be copied and misused.

Recommendation for administrators

If the administrator enables this function for a regular IS K2 user, they voluntarily expose themselves to the risk of easy misuse.

We recommend using this function only for users with restricted rights who serve systems such as attendance, reporting terminals and various information TVs running presentations defined directly in IS K2.

Book Contents

Book Index

Setting up the use of the URL parameter login function

We set this option only for a user with restricted rights, see the information above.

For login using a URL parameter, we recommend having an application server for internal use and internal Web K2 set up.

Otherwise, the user will be required to use two-factor authentication to log in.

After entering the parameters, both the internal application server and the K2WebLayer of the internal Web K2 must be restarted.

Login instructions:

  1. In IS K2 or in Web K2, in the Users book, we find the user with restricted rights for whom we want to set up this login.
  2. We switch to the Quick login tab.
  3. Using the New button or the INS key, we create a new Quick login.
  4. In the Description field, we enter the name of the login.
  5. In the Log in section, we enter a 20-character string (letters, characters, numbers). We display this string using the eye icon and copy it. After save, the string will no longer be visible!
  6. In the Web K2 URL address, we enter the parameter QuickLogin = the string we created in the Quick login section.
  7. We refresh the web page and the user is logged in to the internal Web K2.

If the AS fails, the login using this parameter happens only once, so we recommend combining it with the AutoLogin=1 parameter.

Book Contents

Book Index

Login using passkeys (FIDO2)

It is possible to log in to Web K2 using passkeys. A prerequisite for setting up passkeys is that Web K2 runs on nodejs version 20.11 or higher. The K2 system administrator has this information. The FIDO functionality is supported only on pages running over a secure HTTPS connection.

The login must be set up via the User panel.

pic_10642

Picture: Passkey settings

After clicking the selected icon, a book for entering a passkey opens.

A new passkey is entered via the Create a new access key icon in the ribbon.

pic_10643

Picture: Create access key

A window for creating a new passkey for the user is then displayed.

Below is an example of logging in with a passkey on the Windows platform, via the Google Chrome browser, for logging the user in with a fingerprint.

pic_10644.png

Picture: Security key settings

After the login is set up using the options provided by the user's operating system or web browser, a window for naming the passkey is displayed in Web K2.

pic_10648

Picture: New access key

A list of all passkeys is displayed for the specific user. Using the Remove access key button, the user can easily remove an unused passkey.

pic_10649

Picture: List of passkeys

After the passkey is set up, the user can easily log in to Web K2.

On the start screen, it is necessary to switch to login using a passkey; the user enters their user name and simply logs in using the passkey. They therefore no longer enter their password.

pic_10651

Picture: Changing the login method

pic_10652

Picture: Login using a passkey

Book Contents

Book Index

Using passkeys in the K2WebNative application for Android

To log in using a passkey in the K2WebNative Android application, a file for verifying the link with the application must be available on the server where Web K2 is running.

Requirement for the assetlinks.json file

When logging in with a passkey on the Android platform, Google Play Services verifies the identity of the K2WebNative application independently of the web browser. This link between the application and the web domain is implemented through the [Digital Asset Links](https://developers.google.com/identity/fido/android/native-apps#interoperability_with_your_website) mechanism, which Google defines as the standard way of sharing login credentials (passkeys) between a website and a native Android application. All Android applications using passkeys require the same procedure. Without this file, Google Play Services will not allow the K2WebNative application to verify the key. Login using passkeys will not work and will end with an error message.

The `assetlinks.json` file must be located on the server directly after the domain:

```

https://<domain>/.well-known/assetlinks.json

```

where `<domain>` is the address at which Web K2 is running (for example `https://k2.yourcompany.com/.well-known/assetlinks.json`).

The content of the file must be as follows (it contains data linked directly to the K2WebNative application):

```json

[{

"relation": [

"delegate_permission/common.handle_all_urls",

"delegate_permission/common.get_login_creds"],

"target": {

"namespace": "android_app",

"package_name": "cz.k2.webnative.app",

"sha256_cert_fingerprints": [

"FC:96:24:90:50:34:9F:06:96:13:28:9D:9C:0C:5C:22:31:D1:EC:99:08:8B:99:F4:29:77:D4:45:10:9C:43:BF"]}}]

```

The file is available for download here.

Procedure for making the file available

The system administrator must upload the `assetlinks.json` file to the web server where Web K2 is running. The file must be accessible via the HTTPS protocol at the address given above. The upload procedure depends on the web infrastructure used. General procedure:

1. Download the `assetlinks.json` file from the link above.

2. On the web server, create the `.well-known` folder in the root directory of the domain (if it does not already exist).

3. Upload the `assetlinks.json` file to the `.well-known` folder.

4. Verify that the file is accessible from the internet at `https://<domain>/.well-known/assetlinks.json`.

**Warning:** Login using passkeys in the K2WebNative application for Android requires Web K2 to run on a domain with a trusted certificate from a certification authority (e.g. Let's Encrypt, DigiCert, etc.). Custom (self-signed) or internal certificates are not accepted by Google Play Services.

Notes for administrators

- The `assetlinks.json` file contains only public information (the application package name and the signing certificate fingerprint). It does not contain any sensitive data.

- The file must be accessible without redirection and must return HTTP status 200.

- The Content-Type of the response must be `application/json`. Most web servers set this type automatically for files with the `.json` extension.

- If access to the `.well-known` folder is restricted on the server, an exception must be set for the `assetlinks.json` file.

Book Contents

Book Index

Taking over logged-in sessions

When a user logs in to Web K2, all active sessions of the given user are determined. If we log in from the same or another device (mobile phone, tablet) as the same user, a table with a list of open sessions is displayed.

Taking over logged-in sessions is set up on the Basic data tab in the Users book. Taking over logged-in sessions is not allowed for a user who has two-factor login to Web K2 set up.

A great advantage of this functionality is the ability to continue work in progress on another device (e.g. on a mobile phone or at home) or the ability to remotely close unused sessions and thus release the licences held.

pic_7464

Picture: Form for taking over logged-in sessions

The user has 3 options:

pic_7466

Terminate

The current session is terminated and the new one remains on this form with the option of a new login.

pic_7465

Take over

The current session is terminated and the new one gets into exactly the same state as the current one was.

pic_7467

New login

The current session remains in its original state and a new one is opened.

Book Contents

Book Index

Service user login

To log in as a service user, the URL parameter ServiceUser=1 must be entered.

Login as a service user is primarily intended for consultants!

On the login screen, we then click through to the service user login option by changing the login method.

pic_1703424

Picture: Web K2 - button for changing the login

After clicking the button for changing the login, the option for logging in using passkeys (FIDO2) appears first, followed by the login screen for the service user login.

pic_1703425

Picture: Web K2 - Service user login screen

To log in as a service user, the login method using a password generator must be used.

Book Contents

Book Index

Screen description

The Web K2 desktop is divided into two parts:

Navigation panel

pic_5197_2023

Picture: Navigation panel

Description of buttons:

1

Displays the Main menu - for a more detailed description of the Main menu settings, see the chapter Administrator - System - Main menu.

2

Displays the default list of icons.

3

Displays the area with favourite items. By default, the tab is empty. Favourite items can currently be inserted only via the full K2 client. After the area is saved, the icons are also displayed in Web K2.

4

Displays the calendar.

5

Displays the main dashboard menu.

6

All open tabs.

7

Button for displaying received notifications.

8

Button for switching own companies in the client and logging out - this is the only icon that does not change colour when selected. The person icon can be kept or the initials of the logged-in user can be set.

Note: The icon that is currently active (i.e. whose area is displayed) has a light blue background. Other icons whose areas are not active are dark blue.

User profile icon settings

In the navigation panel, the user's initials can be displayed instead of the person icon in the upper right corner. The desktop needs to be modified, see the chapter Preparing your own area with buttons. After editing the record for the area definition, we open the window by double-clicking a row outside the dynamic content

pic_107527

Picture: Editing the "TMainLayout" record

In this window, we select the Actions tab and then open the Profile row.

pic_107526

Picture: Profile editing

After the window opens, we insert the value auto*user.initials into the icon field. This value changes the display in Web K2, and the initials of the logged-in user are displayed instead of the person icon.

pic_107525

Picture: Changing the icon

Book Contents

Book Index

Main menu

The Main menu contains only books, code lists and functions that can be run in Web K2. The K2 Administrator can modify the structure of this menu according to their own needs via the full K2 client, see the chapter Main menu.

The opened nodes in the Main menu are remembered for a specific user on a specific device/browser.

The main menu displays the items to which the user has the right to record.

pic_7458

Picture: Main menu - open node My office/Tasks

Searching function

In the Main menu, we can use the Searching function. We type the searched expression or phrase into the search field and confirm with the ENTER key or press the magnifying glass. Searching also works for phrases without diacritics.

Book Contents

Book Index

Preparing your own area with buttons

The desktop can be modified according to your own needs via the full K2 client by creating a modification of the "TMainLayout" fragment. In this way, a specific area with buttons can be prepared for different levels - global for the whole company, for individual user roles or for specific users.

Example of preparing a simple area for invoicing clerks:

1. In desktop K2, we add the Fragments book to the desktop.

pic_10352

Picture: Preparing a shortcut to the Fragments book

2. We run the Fragments book and find the "TMainLayout" record, size "33".

pic_10353

Picture: Record of the "TMainLayout" web area definition in the Fragments book

3. We start editing the record for the area definition for Web K2 using the Ctrl+Shift+Alt+F5 keys.

pic_10354

Picture: Editing the "TMainLayout" record

The buttons of the default area are in the "dynamic content" and are defined in the program code. Therefore, they cannot be copied to prepare your own area. We must create the area by newly inserting the required buttons.

4. We create a modification of the area for the required level. In our example, for the "Fakturant" (invoicing clerk) user role.

pic_10355

Picture: Modification created at the Group (Users roles) level

5. In the design, we select the "TFrgtVRTabControl" level (component).

pic_10356

Picture: Selected "TFrgtVRTabControl" level (component)

6. Using the Insert key, we insert a new panel (tab) for our own area by selecting the "Panel" component. We switch to the added tab using Alt+mouse click.

pic_10357

Picture: Active tab of the new panel

7. We set the panel layout to e.g. 10 columns and stretch it to the full height.

pic_10358

Picture: Panel 10 columns wide and stretched to the full height

9. We start editing the panel and assign it an icon (the tab icon in Web K2) and a name (displayed in Web K2 as a hint for the area tab).

pic_10360

Picture: Assigning an icon and a name to the panel (for the tab in Web K2)

8. Using the Insert key, we insert the "Button" component. We then open it and define the necessary properties for the button:

pic_10359

Picture: Editing the "Button" component

9. On the Action tab, using the Insert key, we insert a link to a book, function, print report or script. We also define the required icon for the button.

pic_10361

Picture: Inserting a link to a "book" into the button

pic_10363

Picture: Book definition for the button

10. We set the required size for the button, here Size = 2.

pic_10362

Picture: Panel with the prepared Invoices Out button

11. We can delete the original panel (the Default tab) and move our new panel (the Buttons for invoicing clerks tab) to the beginning.

pic_10364

Picture: Resulting modification of the area definition

12. After a user from the "Fakturant" role logs in to Web K2, the prepared area modification is applied to them.

pic_10365

Picture: Area for users from the "Fakturant" role

Tips for preparing buttons

1. On the factory form definition, we select the "dynamic content" and copy its content to the clipboard using the Dynamic fragment to clipboard function.

pic_10366

Picture: Selected dynamic content of the Default tab and the Dynamic fragment to clipboard function

2. We load (or create) our own modification and paste the content from the clipboard there (into any fragment level). A "Panel" fragment with the definition (with buttons) is inserted.

3. Here we can, for example, select the "Group box" fragment, copy it, paste it onto our own panel and delete the original buttons (they are non-functional). Then we just insert our own new buttons into the relevant group (group box). Furthermore, we can open the individual buttons, take the icon link from them and insert it into our own buttons.

Book Contents

Book Index

Styles

To work in Web K2, users can choose their own scheme, which they can display under the pic_1211i icon.

The Web and Desktop styles are preset. In the Web style, users can define their own colours and choose dark/light mode, transparency mode and contrast mode.

pic_7732_2024_08

Picture: Web K2 scheme

To restore the original Web style, you can use the Set default option; the Web style is thus returned to the original preset template.

pic_7733_2024_08

Picture: Web K2 - user's own scheme

The style defined by the user is saved in the web browser.

Book Contents

Book Index

Colour according to multi company

In the multi company settings, you can choose the Company colour. The colour set in multi company is also used in Web K2.

pic_10285

Picture: Company colour

pic_10286

Picture: Multi company colour in Web K2

Main area

The main area is the same as in the full K2 client. It therefore consists of several parts:

  1. List of tabs available in this module.
  2. List of records/Detail of the current record – this displays the content of the tab we selected from the list.
  3. Record preview – this is a quick preview panel which always shows the basic information of the currently selected record.
  4. Ribbon – the basic toolbar of forms. It contains the basic functions that can be performed with the data module or with the specific record on which the cursor bar is placed.

pic_5198_2023

Picture: Basic layout of the book area - List of tabs, List of records/Record detail, Record preview, Toolbar

By right-clicking, the user can pin (display next time as well) and unpin a tab.

pic_10534

Picture: Web K2 - pinning a tab

If the user is changing a document, a pencil icon is displayed for the given module. In browse mode, this icon is not displayed.

pic_10535

Picture: Web K2 - browse/change mode

When the Elasticsearch function is set up, a + button appears in the list of tabs. In this window you can easily search across the modules defined in Elasticsearch indexes and also easily create shortcuts.

pic_10127.png

Picture: Elasticsearch search in Web K2

Book Contents

Book Index

Mobile display of columns in Web K2

Web K2 can also be run on a mobile device. For better clarity of the data displayed in columns, you can switch to the mobile phone view.

pic_10609

Picture: Web K2 - without mobile display of columns

pic_10608

Picture: Web K2 - mobile display of columns enabled

Book Contents

Book Index

Modules and components supported in Web K2

In Web K2 you can work in modules for which a so-called universal form (blue form) exists. All functions and field meanings of these modules are described in the IS K2 user manual. Only the differences from working in IS K2 are described here. Web K2 does not support displaying the original user interface (grey forms) or generated grey forms. As soon as the server receives a request to display such a form, Web K2 ends with an error.

To work with Web K2, pop-up windows must be allowed in the web browser.

Web K2 will continue to be gradually extended with further modules and UI components.

List of implemented components:

CONTAINER COMPONENTS:

SIMPLE COMPONENTS:

Through Web K2 and its components, you can work with K2 modules as in the full client, including running reports and scripts. Editing reports and scripts is so far only possible in the full client because, as mentioned above, Web K2 does not support displaying forms in grey forms. To run a report or a script, it must have the AS3Compatible flag.

Book Contents

Book Index

Kanban board in Web K2

In Web K2, you can define the Kanban component via the Form designer.

Once the component is defined, Web K2 displays a kanban board, i.e. a board divided into the required columns and rows. Tasks, projects, opportunities, etc. displayed in the rows of the defined Kanban board can be freely moved between the individual columns by dragging with the mouse.

This option makes it possible to speed up the resolution process.

pic_10275

Picture: Kanban board - Opportunities

Book Contents

Book Index

Responsiveness

When displaying a form, Web K2 can load a specific form defined for the current width of the display on which it is running. If no form is designed for this display, it shows the default form of the given module and adjusts it so that it is easy to operate on the given device.

Examples of form display on various devices

Web K2 first calculates the display width by reading information from the browser and thereby detecting whether the device is a mobile phone, tablet or desktop. It then recalculates the display width based on the resolution and DPI (so a mobile phone may have a different form in portrait and landscape orientation).

pic_5617

Picture: User login to Web K2

Example of opening the Articles book on a laptop

When the Articles book is opened, Web K2 loads the form definition for Articles for the specific detected display width and the logged-in user. If there is no form for the required width, a form of a smaller size is searched for (or the default one, 33 cm, is used).

pic_5618

Picture: Example of opening the Articles book on a laptop

Every form in K2 is divided into columns and rows. A component on the form has a defined order and number of columns and rows it is to occupy. When the form is rendered, the components (in order) are gradually rendered into columns and rows according to their definition.

Example of opening the Articles book on a tablet

When the Articles book is opened on a tablet, Web K2 detects the device type in landscape orientation and tries to load a form of a specific size (e.g. for an 11-inch iPad Pro in landscape orientation it tries to load a form 25 cm wide). If it does not find the form, it searches for a form of a smaller size. If it does not find that either, it opens the default form for a width of 33 cm and adjusts it:

Components containing tabs are transformed into a drop-down button (numbers 1., 2., 4. in the picture).

The Ribbon changes its content to small buttons (number 3. in the picture).

The Preview panel is hidden under a button (all splitters on the form are hidden in the same way).

Content components such as panels, expanders and group boxes reduce the number of columns into which the components will be rendered, see 4., which changes the layout of the components.

Pop-up windows for selecting a value (for example lookup) are automatically displayed full screen and use an animation in which the window slides in from the left.

Pop-up windows for displaying a query use an animation in which the window slides in from the bottom.

Pop-up windows for displaying a menu (pop-up menu) use an animation sliding in from the bottom.

pic_5619

Picture: Example of opening the Articles book on a tablet

Example of opening the Articles book on a mobile phone in portrait orientation

When the Articles book is opened on a mobile phone, it is displayed in the same way as on a tablet. The difference is in the content components, which transform their content into a single column so that the form can be operated on a mobile phone.

pic_5620

Picture: Example of opening the Articles book on a mobile phone in portrait orientation

The behaviour of the automatic form adjustment can be influenced using URL parameters, which are described in the Web K2 parameters section.

Parameters affecting responsive display

ScreenSize – the size of the form in cm that Web K2 will display. Enabling this parameter disables automatic size detection, which may not be accurate on certain displays. The default size of forms in K2 is 33 cm.

StyleOfModalWindowShow – Defines the style of opening pop-up windows (values: mobile or normal).

IsPdfSupport – specifies whether the device's browser supports native PDF display (values: 0, 1).

Zoom – sets the default VCX zoom (zoom in/out value, e.g. 1.5).

TransformColumnsCount – defines the number of columns at which a content component (expander, panel, groupbox) is to be transformed (e.g. [2,4] – 2 in portrait and 4 in landscape).

ResponsiveBreakpoint – we can define from how many pixels Web K2 is to use the transformation of form components for touch devices (e.g. tabs, preview panel, etc.).

Book Contents

Book Index

Special functions of Web K2

Reconnect

Reconnect is a feature of Web K2 thanks to which the user does not lose unfinished work even when temporarily losing the internet connection. If the user's signal drops, the application tries to reconnect at defined intervals. As soon as the connection is available, the user's last application state is loaded. After X unsuccessful attempts, the application is closed.

Signing a document on a touch device via Web K2

Signing documents is one of the advantages of Web K2. For signing to work, Web K2 must be installed and a report (or reports) must be created with the following fields for this action: SignPicture and SignText.

Procedure for adding a signature button to the ribbon:

1. Turn on the form designer using the CTRL+ALT+SHIFT+D keys in the book where we want this action to be available, in our case Delivery Notes Out.

2. After opening the form designer, we proceed to add a new action: double-clicking the ribbon fragment opens a new form.

pic_5205.png

Picture: Adding a new action to the Ribbon

3. Click the Actions tree button, and in the new form select the location where we want the Signature to be displayed. In the picture below, the Home tab, Other section is selected. Once the section is selected, we can proceed to add the Action itself by clicking the button of the same name "Action".

pic_5199.png

Picture: Adding a new action to the Actions tree

4. Another form then opens, see below. On this form, first select the "faloInParentPathAll" option in the Parameters of action display section, then search for the command for the Ribbon component, namely SignAMReportCOMAND, and select it.

pic_5200.png

Picture: Searching for the SignAMReportCOMAND command for the Ribbon component

5. In the next form, name the selected command in the Title field – this will then be visible as the button caption in the ribbon. In the Parameters grid at the bottom, select the only available parameter, Configuration.

pic_5201.png

Picture: Naming the action and inserting parameters

6. On the next form, uncheck the User input option and click the pencil button for further editing.

pic_5202.png

Picture: Editing the Configuration parameter

7. On the new form, enter in the Report field the name of a report that meets the prerequisites for successful signing (i.e. a text field, most often Name and Surname; a field for the signature image). In our case, the Delivery note document report ::\\DBNAME\Standard\DLV_DOK01.AM is prepared for signing. Then you need to fill in the DocumentTypeId field: 33 (This is the identification number of the document type to be generated after signing. In this case it is a pdf file.). In the Parameters grid, add two parameters using the Insert key or the New button: JoinSign and Sign. The JoinSign parameter must have its value set to True.

pic_5203.png

Picture: Inserting report parameters: JoinSign and Sign

8. Then go through all open forms and confirm them with the OK button. Once we have finished the form design, it must be saved. The button is displayed in the top bar where we placed it. In our case, it is the Home tab, Other section.

pic_5204.png

Picture: Sign button on the Delivery Notes Out form

Signing a report on a mobile device

1. In the list of records, select the one we want to sign with the cursor bar and then click the Sign button (or a differently named button for signing the document).

pic_5245

Picture: Signing the Delivery note report

2. After clicking, we see the document, which the user can still check before signing. If everything is OK, we enter the Name and Surname of the person signing the document in the field at the bottom of the form. Then we click the Sign button, which takes us to a new form for the signature.

pic_5246

Picture: Report preview before signing

3. Sign in the marked area. Confirming with the OK button generates the required report (in our case the Delivery note) with the name and signature.

pic_5247

Picture: Form for placing the signature

pic_5249

Picture: Preview of the automatically generated document - Delivery note

4. After it is generated, the report is automatically attached to the External Documents and Documents (9th Page) tab of the given record in K2.

pic_5248

Picture: Delivery Notes Out - External Documents and Documents (9th Page) tab

Book Contents

Book Index

Signature pad

To sign documents in Web K2, you can also use signotec signature pads.

The prerequisites for it to work are:

If communication with the pad takes longer, check the communication type. The pad must be set to the USB variant.

When you click the signature button we added, a form is displayed for entering the name and surname of the person signing the document.

pic_10624

Picture: Form for entering the name and surname of the signing person

Then click the Sign button. If the signature pad is installed correctly, you can sign on it, and the signature is displayed in Web K2.

pic_10625

Picture: Signature on the signature pad

Information about the signature pad device is shown at the top of the screen.

If we use the Detach button below the signature preview, the signature pad is disconnected and a window for signing the document on a touch device is displayed.

The Repeat button deletes the signature and we can sign the report again.

The Confirm button confirms the signature and a window with the Resulting signature is displayed.

pic_10626

Picture: Resulting signature

After clicking the OK button, the resulting signature including the name and surname of the signing person is displayed on the report.

pic_10627

Picture: Resulting signature on the report

Other URL parameters

In the browser address bar, after the Web K2 address, you can enter parameters that affect the behaviour of Web K2 (e.g.: https://demo.k2.cz/k2/?IndependentFormatMode=1).

Options with which Web K2 runs the defined URL parameters and their functions:

Lang – user language. Web K2 loads the language from the user's environment, from the operating system. The parameter can be used to force the language and thus affect the behaviour of some components that display data according to the user's environment (value e.g. cs).

IndependentFormatMode – Independent date and time when entering (0 or 1).

ClassName – immediately after login, runs a specific module or book (e.g.: TD_ZAK).res

K2PK - opens a book on a specific record (e.g. K2[DEMO].DM[193].PK[F4000000] opens activities).

EditMode - works only in combination with K2PK; sets the state in which the record is to be opened (edit/new/etc.) (e.g. EditMode=remEdit).

ClassName - Defines the class that Web K2 is to open, for backward compatibility. If only this parameter is used, Web K2 opens without the main area. This state can be suppressed, see below.

SelectionID – Filter identifier; works only in combination with the ClassName parameter, in which case the DM opens in the main area as a tab with the filter applied. (e.g. className=TD_Zbo&SelectionID={D13D0EE7-A5CB-4976-9554-7EFAEE4884A9}). Articles with the filter Available < Min.

ActiveDC - DataContext of the field that is to be set after opening. If it is used with K2PK or ClassName, it is set on the opened form for the given K2PK, ClassName. If it is used without these parameters, it refers to the main area. (e.g. ActiveDC=\:detail\:Detail\ActivityTreeGroupedChild\:list).

FrgtId – Fragment to be used for the form; if ClassName/K2PK is used, it refers to it, otherwise to the main area. UseMainLayout- 0 - Only the record for K2PK or Classname opens, but if neither is defined, the area opens anyway. 1 - Everything always opens in the main area.

Script - After login, the defined script is run and after it finishes, K2 closes. The area form always opens under it, or if Classname/K2PK is specified, the form of the given record. The script does not take over any data, it is just run over that form.

ScriptParams – allows you to set the parameters of the script to be run after logging in to Web K2. This parameter only works if a script name is specified. E.g. ?Script=ATTT_Terminal.PAS&ScriptParams=(TerminalAbbr='TERMINAL1').

InplaceEditBehavior=mobile|normal -For mobile devices, it handles the behaviour of in-line editing so that for each edited field a form is generated containing the field and buttons for OK, cancel and moving to the next and previous editable field.

StyleOfModalWindowShow=MOBILE&IsAnimationDisabled=1 - Disables animations for mobile devices.

IsAnimationDisabled=1 - disables animations; the only animation will be loading.

Expand-tabs - the parameter sets the default state of the drop-down menu. If the parameter is set to 1, the menu will always be expanded.

ShowKeyboardOnFocus=1 - You can force the keyboard to slide out automatically when an input has focus. Works only for Android (0 or 1).

ShowReloadInBusyAfterTime - This parameter sets the number of seconds after which the refresh button is to be displayed. The number of seconds after which the button is to be displayed is set e.g. ShowReloadInBusyAfterTime=15.

AutoLogin=1 - When Web K2 is started with this parameter, a checkbox with the option to remember the name and password is displayed on the login page. It is intended mainly for internal use, so that automatic login occurs on the next visit or after an application server crash. The most common case where we recommend using AutoLogin is when the web client should stay logged in after a reinstallation. To turn the login off, you must log out in the standard way or start Web K2 without the parameter AutoLogin=0. Another way to log out is while Web K2 is loading, when you can click the Change user button.

UseServerVirtualKeyboard - This URL parameter determines whether the client virtual keyboard or the classic server form representing a keyboard is used. Setting the parameter UseServerVirtualKeyboard=1 forces the server keyboard.

UserName - when this parameter is used, the user name is pre-filled in the Web K2 login window. If, for example, UserName=DEMO is entered, the user DEMO is automatically filled in the login window.

ExplicitMaxRowCount - this parameter affects the number of records on mobile devices, and moving a finger over the grid scrolls the list. By default, the parameter is set to 200 records.

NCLAPPIGNOREPOSTBACKTHREAD=0 - This URL parameter can be used to set the gauge. By default it is set to 0; to turn the gauge off, it must be set to 1.

ClearCookiesAfterLogout=1 in conjunction with the AutoLogin=1 parameter - the default value is set to 1 - cookies are deleted when the user logs out. If the parameter is set to 0, cookies are not deleted after the user logs out and the user is logged in again after the page is refreshed.

DefaultLoginType – parameter for setting the Web K2 login window. If it is set to 0 (default), login to Web K2 is done using a name and password. If the parameter is set to 1, login is done using a PIN, and if set to 2, login to Web K2 is done with a card.

LoginPinLength – this parameter specifies the required number of characters in the PIN for logging in to Web K2. After the required number of characters is entered, automatic login to Web K2 takes place. By default, the length is set to 4 characters.

ShowCursor - if this parameter is set to 0, the cursor is not displayed for Web K2. The parameter is used mainly for attendance terminals. By default, the parameter is set to 1.

CompactSections - if the parameter is set to 1, the icons in the Web K2 ribbon are reduced according to the monitor size.

ServiceUser - if the parameter is set to 1, it is possible to log in to Web K2 as a service user.

Book Contents

Book Index

Parameters for a custom Web K2 style

To extend Web K2 with your own style, you need to create a *.css file named after the template in the wwwroot/css/themes/ folder. Keep in mind that the default style is "desktop". Other templates only extend this style. Finally, the custom template must be defined in themes.json (otherwise it will not pass the existence validation).

Book Contents

Book Index

Parameters in the configuration file

Parameters for Web K2 can also be entered using a configuration file in the "*.json" format. This file must be saved in the "k2-web-layer" directory, which is in the directory structure of the Web K2 installation. Any parameter can be entered in this file, and it is then not necessary to insert them into the Web K2 URL. The only Web K2 parameter is then the name of the configuration file with the list of parameters. So if the configuration file is called e.g. "parametry.json", it is enough to add the parameter "?config=parametry" to the Web K2 URL. All parameters from the configuration file will then be applied.

Example of setting parameters using a configuration file:

{

"ClassName": "TMTMenuOperationDM",

"StyleOfModalWindowShow":"MOBILE",

"ResponsiveBreakpoint" : 1,

"IsAnimationDisabled" : 1,

"UseServerVirtualKeyboard" : 0

}

Book Contents

Book Index

Web-layer configuration

The "AppServerConfig.json" configuration of the web-layer can be changed at runtime, without the need to restart the service.

Individual parts:

Calling a phone number

Every displayed phone number has a function to make a call in the context menu via the right mouse button, either via a telephone application, or on a mobile device the call is redirected.

Book Contents

Book Index

Connection set-up parameters

By adding the NCLAPPLICATIONLIVETIME and NCLAPPLICATIONNOOPINTERVAL parameters to the k2.ini file, you can influence the interval during which the server connection is active in the case of web client inactivity.

NCLAPPLICATIONLIVETIME=XX – number of seconds before a correct logout and release of the licence occurs. The server holds the ncl application if the client is not communicating. The default setting is 30 minutes.

NCLAPPLICATIONNOOPINTERVAL=XX – number of seconds after which, in the case of inactivity, the client sends a noop, a message that it is still active. The default setting is 5 minutes.

Book Contents

Book Index

GPS location

Web K2 allows the location of a mobile device to be determined in the background using the GPS signal. For these purposes, 3 functions are published for scripts. They are:

Book Contents

Book Index

Foxentry

In Web K2 you can use address suggestions via FoxEntry. The configuration is done in the AppServerConfig.json file.

Once the settings are correct, address fields will be suggested.

pic_10417

Picture: Using Foxentry in Web K2

Book Contents

Book Index

Displaying a menu with a click-through option to a call, e-mail or web page

When a phone number, web page or e-mail is entered in the correct format in the contact information, Web K2 displays a menu with a click-through to the given option after right-clicking.

This menu can be used from the Basic data tab in the Contact information section, from the List tab if we have these data added to the columns, and from the Electronic addresses section in the Preview.

pic_10498

Picture: Web K2 - Displaying the call menu from the Basic data tab

pic_10499

Picture: Web K2 - Displaying the call menu from the List tab

Book Contents

Book Index

Options for customizing the floating help

In Web K2, the floating help is set by default for fields and buttons in the ribbon.

Turning on the floating help (for all users) for other components must be set in the AppServerConfig.json file; this setting is done by the K2 system administrator.

At the same time, users must have the floating help turned on in the System tab via the Show floating help. button

pic_10687

Picture: Web K2 - Show floating help

Book Contents

Book Index

K2 WebNative

Web K2 can also be run via an application that can be downloaded from the Web K2 user panel.

pic_10522

Picture: K2 WebNative

K2 WebNative enables:

The application is supported for the Microsoft Windows 10 and 11 operating systems.

We do not recommend using the application on terminal servers, which may have various service restrictions.

Sending e-mails via the new Outlook is not supported.

Book Contents

Book Index

K2 WebNative installation

After downloading the application from Web K2, a window with the K2 Web Native installation is displayed.

pic_10523

Picture: K2 WebNative installation

During installation, the user chooses whether to install the application only for themselves or for all users of the computer.

After the application is installed, a shortcut for starting it is displayed on the desktop.

In the shortcut, you need to set the web address of the client, or the Web K2 URL parameters used. On other tabs, you can set the address/port of the payment terminal, the printer and USB peripherals.

The Run application button opens a window with Web K2.

pic_10525_2026

Picture: K2 WebNative general settings

The next time the K2 WebNative application is started, the Web K2 login window is displayed directly.

pic_10526_2025

Picture: K2 WebNative login screen

After logging in to the application, the default Web K2 area is displayed. Via the user panel, you can open the configuration (the window with the K2 WebNative general settings) and the toolbar (View, Controls, Help).

pic_10527

Picture: K2 WebNative - configuration and toolbar

In the K2 WebNative configuration, you can also set up multiple profiles, e.g. a test and a production profile. The configuration is opened on the K2 WebNative start screen using the keyboard shortcut Ctrl + O, or via the user account icon in the Native client - Open configuration section.

pic_107418

Picture: K2 WebNative - profile settings

The profile administration then displays the profiles defined in K2 WebNative. You can work with each specific profile.

The checkbox determines the default profile.

pic_107419

Picture: K2 WebNative - Profile administration

In the Profile settings section, we can choose:

pic_107420

Picture: K2 WebNative - Profile editing

In the Configuration section, a window for configuring K2 WebNative appears, in which you can change the address link, set printers and the other options mentioned above.

Book Contents

Book Index

Printing to multiple printers

The K2 Web Native application enables printing to multiple printers.

Printing to a selected printer can be set:

The printer for a selected report is set in the Printer section. Here the user sees all their printers and also the printers of the Application server user. Printers may therefore appear twice in the selection. In this case, the user selects the printer marked local for the selected report. Printing any report from the browser without a selected target printer or with a printer marked local offers only the option of printing to PDF format.

pic_107378.png

Picture: Setting the printer in the report for the user

If the user does not have a printer selected for the given report, printing is done on the printer set in the User parameters in the Default printer section.

pic_107379.png

Picture: Setting the printer in the user parameters

The printer can also be defined directly in the Configuration of the K2 Web Native application.

pic_107380

Picture: Setting the printer in the K2 Web Native configuration

In the Work printer section, we can define the selected printer for printing. If the printer is specified as default, printing is done on the default printer set on the computer.

As the printing application, we can choose K2 Web Native or External (Acrobat, PDF Viewer).

The path to file is entered when an external printing application is specified. The time limit after which the printing application is closed is entered in seconds. The limit does not have to be entered.

Book Contents

Book Index

K2 WebNative (for Android)

The K2 WebNative application is also supported for devices built on the Andriod platform. These include, for example, devices such as warehouse readers or payment terminals for mobile sales.

The K2 WebNative application consists of two executable activities. After installation, the K2 WebNative application appears on the device's home screen. When the application is started for the first time, the user sets the path to the folder in which the configurations will be saved. After that, the configuration is loaded from and saved to this folder in the k2_conf.json file. If such an application file is found, the configuration will be loaded from it and changes will also be written to it.

Configuration files are portable and are suitable for bulk configuration of, for example, readers.

Example:

[

{"name": "Production", "url":"https://moje.k2.cz", isDefault: true},

{"name": "Demo", "url":"https://demo.k2.cz", isDefault: false}

]

K2 WebNative is the main application in which Web K2 runs. If there is no configuration with the specified URL, the K2 Settings application is started to create and set up a configuration. The K2 Settings application is used to set up the list of configurations. Each configuration has a name and a URL, and may have information assigned about whether it is the default.

pic_8261

Picture: K2 Settings - Configuration settings

In the upper part of the form, fill in the New address field (i.e. the "Enter name" line of the new configuration) and enter the URL (including https:// or http://) on which IS K2 runs. Checking the Default field sets the configuration as the default, and pressing the Add new button creates the new configuration. If a configuration file has been created, the URL can also be set together with this configuration file, which ensures that the Cash register system module is also started immediately after IS K2 opens.

If one of the configurations needs to be edited or deleted, hold your finger on the relevant record (approx. 1 second). A menu for editing, deleting or setting the Default state becomes available.

pic_8253

Picture: Editing an existing configuration

Then, by double-tapping the required configuration, we start Web K2 according to the selected configuration. It is thus possible to have one device linked to several K2 systems.

If we want to call up the Settings of the K2 WebNative application at any time while the K2WebNative application is running, we call up the Settings by tapping 5 times in a row in the upper left corner of the display anywhere in the K2 WebNative application (see the yellow-framed area in the upper left corner of the picture K2 WebNative application settings). The settings can be opened this way not only from the start screen after the application is launched, but from any IS K2 form. Calling up the application settings is not indicated by any specific icon and is invisible from the user's point of view.

pic_8256

Picture: Place for opening the Settings of the K2 WebNative application

Book Contents

Book Index

User parameters in Web K2

In Web K2, users can set their user parameters. The parameters are divided into several tabs.

General - extended tab

On this tab, you can set the Business year, User language, Default printer and other parameters.

pic_1703770

Picture: User parameters - General - extended tab

Environment tab

The Create new tabs on click parameter:

Book Contents

Book Index

K2 Chat

In Web K2, users can use K2 Chat to communicate with each other. The K2 Chat icon is displayed in the User panel next to the Notifications icon.

In the chat, you can send not only messages but also links to individual records.

pic_1703402

Picture: K2 Chat - chat icon and link to the required record

If the user has several tabs open, options with links for sending the records in the open tabs are displayed. The link to the record the user is currently working with is always displayed first.

Clicking the link sent in the chat opens the given record.

pic_1703404

Picture: K2 Chat - link to a sent record

K2 Chat can be used on all devices on which Web K2 can be run.

pic_1703406

Picture: K2 Chat on available devices

Book Contents

Book Index

Security

Book Contents

Book Index

HTTP headers

For Web K2, the HTTP headers are set up by the development department.

Recommended settings that can no longer be directly influenced within our administration and are checked by the IS K2 system administrator:

  1. Header X-Powered-By
  1. Header Server
  1. Permissions-Policy
  1. Mandatory operation over HTTPS