Set up the field mapping for each record mapping of the message. On the field mapping, you define which target document record fields are mapped to which source document record fields. The resulting field mapping is used to get the right data from the source and get it in the right format to the right place in the target.

To set up the field mapping, you can:

  • Add fields manually.
  • Select fields from a list.

You can only use the fields, as defined for the related record in the target document.


Standard procedure

1. Click Connectivity studio Integration Design.
2. On the Message tab, in the list, find and select the desired message.
3. Click Edit.
4. In the Mapping section, in the Target record pane, in the list, find and select the desired target record.
5. Sub-task: Add mapping field manually.
  5.1 On the Mapping tab, on the Field mapping tab, click New.
  5.2 In the Target field field, enter or select a value.
 

Note: You can only enter a field as defined for the target record on the target document.

6. Sub-task: Select mapping fields.
  6.1 You can select fields from a list of fields as defined for the applicable target record in the target document.
  Click Select mapping fields.
 

Note: Only the target record fields are shown that are not yet used for a field mapping.

  6.2 You can manually select fields to be added to the field mapping.
  Select the Selected check box.
  6.3 If a field name in the target record is the same as a field name in the source record, these fields are automatically mapped in the Select mapping fields dialog.
You can select all automatically mapped fields.
  Click Select mapped fields.
  6.4 You can select all fields as defined for the target record.
  Click Select all.
  6.5 Click OK.
7. Sub-task: Set field mapping details.
  7.1 Key fields are used to find a record. You can define which target fields are the key fields. If a field is set as key field for the target record, the Key field check box is automatically selected.
  Select the Key field check box.
  7.2 Usually, you select a source field from a source record.
However, you can also select a source field from a target record. This target record serves as source for the field mapping. You can, for example, use a previous record mapping to only find a record and use this as input for the field mapping.
To use a target record as source record, in the Source field lookup, change the direction to Target and select a target record.
  In the Source record field, enter or select a value.
 

Note: If you use a target record as source record, make sure that the selected target record mapping is done before the current record mapping.

  7.3 Select a field from the source record.
  In the Source field field, enter or select a value.
  7.4 You can set a constant value. On executing the field mapping, the 'Get a value' process, gets the constant value and uses it as input for the 'Modify a value' process.
You can use a constant value if the required value does not exist in the source.
  To apply a constant value, select the Constant check box.
 

Note: If this check box is selected, also fill in the Constant value field.

  7.5 If the Constant check box is selected, define the constant value for the target field.
  In the Constant value field, enter or select a value.
 

Note:
If the target document is an:
- Internal document, you can select a value from the table that is related to the target record.
- External document, you can only type a value.

  7.6 To make sure a target field is always filled, you can define a default value for the target field. If no source value is available for the field, the target field gets this default value.
  In the Default value field, enter or select a value.
 

Note:
If the target document is an:
- Internal document, you can select a value from the table that is related to the target record.
- External document, you can only type a value.

  7.7 You can indicate in which cases the field mapping must be executed:
- Always: The field mapping is always executed.
- On insert: The field mapping is only executed if a record is inserted (new record).
- On update: The field mapping is only executed if a record is updated (existing record).
- Skip: the field mapping is skipped when the message is run. This option is usually used temporarily. For example, when you design or test a message.
  In the Execute field, select an option.
 

Note:
- If you export data (if the target document is an external document), this field must have the value Always.
- On import of data (if the target document is an internal document), you can use On insert or On update. To determine if a record is new and must be inserted or already exists and must be updated, the key fields of the target record are used. So, make sure to set key fields on the target record if you use On insert or On update.

  7.8 Define if the current value in D365 FO must be updated or not.
You can set up these scenarios:
- Always update: Execute = 'Always', Retain local value = 'Never'.
- Only update if source value exists: Use a mapping condition to only map the field value if a source value exists.
- Keep D365 FO value if it exists: Retain local value = 'Not empty'.
- Never update: Execute = 'On insert'.
- Always keep D365 FO value: Retain local value = 'Always'.
  In the Retain local value field, select an option.
 

Note:
This field is shown only if the target document:
- Is a D365 FO document.
- Has the BisDocumentAxDatabase handler class selected, or an extension of this handler class.
Example: In Master data management, you can use this option to not override a value in the child company if the value is updated in the master data company.

  7.9 Usually, if you:
- Export data (if the target document is an external document), you do not validate it. So, by default, this check box is selected.
- Import data (if the target document is an internal document), you validate the data. So, by default, this check box is cleared. However, some validations are not useful or simply wrong. For example: The validation message is not clear when table ID references are used in the mapping. In this case you can skip the validation.
  Clear or select the Skip validation check box.

Notes

To make sure, your field mapping is complete, you can view the document fields that are not mapped. To view the non-mapped fields of the:

  • Source document, on the Message page, on the ActionPane, on the Design tab, in the Source group, click Non-mapped fields.
  • Target document, on the Message page, on the ActionPane, on the Design tab, in the Target group, click Non-mapped fields.
You can define which fields are not mapped on-purpose. To do so, on the Non-mapped fields page, on the Skipped tab, enter these fields and the reason to not map these fields.

Related to Notes

Set up field mapping

 

See also

Provide feedback