Skip to content

Creating Data Mappings

A data mapping defines the connection between a specific area in Business Central, a document library, and the associated metadata. Only one mapping per area can be defined. The creation is based on the document type definition.

Steps to Create a Data Mapping

  1. Navigate to the administrator role center.

  2. In the menu, click “Mapping” and execute the “Data Mapping” action.

  3. Click “New” in the action bar to create a new mapping.

  4. Enter a code in the “Code” field.
    → This code uniquely identifies the mapping.

  5. Enter a description in the “Description” field.
    → The description should clearly and understandably identify the purpose of the mapping.

  6. Specify the target table in the “Target Table” field.
    → This is the original table the document should be linked to.

  7. Specify the target field in the “Target Field” field.
    → This is the field in the target table used for linking.

  8. Select the type in the “Type” field.
    → This defines how source and target fields are connected.

  9. Specify the source table in the “Source Table” field.
    → This is the table from which the value originates.

  10. Specify the source field in the “Source Field” field.
    → This field provides the value that will be linked to the target field.

Simple Actions

The following simple actions can be configured in the data mapping to get common values:

Function Name Description
USERID Returns the current user ID
USERFULLNAME Returns the full name of the current user
USERCONTACTEMAIL Returns the contact email address of the current user
CURRENTDATE Returns the current date
COMPANY Returns the current company name

to configure these actions follow these steps:

  1. Search for CORE Data Mapping
  2. Create a new CORE Data Mapping
  3. Define A CODE for the Data Mapping
  4. Enter the data mapping lines
  5. In the Type field, select FUNCTION
  6. In the Field Filter field, enter one of the above simple actions

Advanced Options

  • Apply filters:
    → If conditions are required for the mapping, a new line can be added.
    → The Type field can be set to FILTER or CONST.
    → The filter value is entered in the Field Filter field.
    → The filter applies to the specified source table and field.

  • Continue with another table:
    → To continue the mapping on another table, add a new line and enable the “New Table” checkbox.
    → The current Source Table becomes the new Target Table for the next line.

  • Finish with RETURN:
    → The last line must be added with the type “RETURN”.
    → This line returns the final value from the last source field to be used in the mapping.