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:
You can only use the fields, as defined for the related record in the target document.
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: |
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: |
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: |
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: |
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. |
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: