M3 Customer-Defined Fields (CDF)

This document describes the concept of using customer-defined fields (hereafter called CDF) in M3. CDFs are used to add customer-unique information to the M3 database without the need for a modification. CDFs can also be directly used in configurable lists, Ad Hoc reports, XML output, etc.

Background

M3 Business Engine has various user-defined fields for select types of information. These are, however, limited in types and are often too few to cover all needs. The CDF functionality are added to complement these and to minimize the need for modifications to add additional information to the M3 database.

Definition of CDF

The metadata that defines the CDF to be used is added through the program 'Customer-Defined Fields. Open' (CMS080). The metadata includes a selection of the M3 table to extend (see below), the type of information (string, numeric information, etc.), as well as the used length, number of decimals, etc. The user also sets the description of the CDF that is used as column headings in lists, reports, etc.

The initial selection of this information is done by the user selecting a field in the drop-down list that is as close as possible to the final definition. The user can select from various types like check boxes, dates, and numeric fields, as well as various lengths of alphanumeric fields.

Note that the metadata for the CDF must be defined for information to be added to a field in the CDF tables, or the CDF information to be used in the M3 lists, reports, etc.

Adding CDFs to extend the M3 standard information

This type of CDFs is used to store information not connected to or directly related to the standard M3 information. It is also used to store related information that needs additional or fewer keys than the standard M3 information.

To add this type of CDFs, the user selects a table where the information is to be stored (CUGEX2 or CUGEX3) and secondly defines the ID of the information, in form of the customer extension reference, before selecting the type of field to be used. The customer extension reference is later used as the key to separate different information stored in the same table. This should be named in such a way that makes it easy to know which type of information that is stored.

Adding CDFs not related to M3 standard information

This type of CDFs is used to store information not connected to or directly related to the standard M3 information. It is also used to store related information that needs additional or fewer keys than the standard M3 information.

To add this type of CDFs, the user selects a table where the information is to be stored (CUGEX2 or CUGEX3) and secondly defines the ID of the information, in form of the customer extension reference, before selecting the type of field to be used. The customer extension reference is later used as the key to separate different information stored in the same table. This should be named in such a way that makes it easy to know which type of information that is stored.

Definition of valid values

The CDF definition can also include rules for validation of entered values. This includes a valid range and a multiple for numeric values (for example, valid values are 4–12, but each value must be evenly divisible by 4, meaning only 4, 8 and 12 are valid), as well as a list for both numeric and alphanumeric values. The latter is maintained through a separate program: 'Customer-Defined Fields Value Map. Open' (CMS081). Note that an entered value for a date of the type CDF must exist as an active date in the M3 system calendar.

Maintenance of CDF fields

Information stored as a CDF are maintained through the CDF API (CUSEXTMI). The API performs validation according to the rules defined in the CDF metadata. The information is then also conformable to the established way of storing it in the M3 database.

Usage of CDF fields

The information stored as CDF fields can be used as a part of M3 without any need for special coding or modifications. The exception to this is if the CDF must be added to a detailed M3 Business Engine panel, or used as part of existing or new business logic.

Technical storage of CDF in the M3 database

The information stored as CDFs are managed by three special CDF tables in the M3 database. Thus, the CDF information is not stored in the original table if it is used to extend a standard table, but retrieved in a separate database access. These are the names of these tables:

The information stored as CDFs are stored in the M3 database in the CUGEX1 table for extended tables, or in CUGEX2/CUGEX3 for not related information. The CDF information is stored in the fields selected in the definition of the CDFs. The extended information in the CUGEX1 table is stored with the name of the extended table as the first key (in the FILE field). The rest of the keys are set identically to the primary key of the extended table. The unrelated information is either stored in CUGEX2 or CUGEX3 depending on the selection when the CDF was defined. The second key is the customer extension reference that was also selected during definition. The other keys are controlled by the update and not validated.

Limitation

As a maximum, the CDFs can use eight keys to separate information. This means that M3 tables of more than eight primary keys cannot be extended.

Related topics