Share via


Handling Missing Option Values in Mapping

Microsoft Dynamics 365 for Sales contains only three so-called option set fields that contain option values, which can be mapped to Dynamics NAV fields of type Option for automatic synchronization. During synchronization, such non-mapped options are ignored, the missing options are appended to the related Dynamics NAV table and added to the CRM Option Mapping system table for manual handling later, for example by adding the missing options in either product and then updating the mapping. This is described in the following.

The Integration Table Mapping table contains three maps for fields in the current version that contain one or more mapped option values.

Screenshot that shows the Integration Table Mapping table. SHIPPING AGENT is selected in the first column.

After a full synchronization, the CRM Option Mapping table contains the non-mapped options in the three fields respectively. (Green rows are for payment term options. Yellow rows for shipment method options. Blue rows are for shipping agent options.)

Screenshot that shows the C R M Option Mapping table with rows highlighted green, yellow, and blue.

The content of the CRM Option Mapping table is based on option strings in the CRM Account table. Screenshot that shows the C R M Account table options. F O B is selected and its value is set to 1. No Charge is selected and its value is set to 2.

In Microsoft Dynamics 365 for Sales, the following fields on the account entity are mapped to fields on the customer record:

  • Address 1: Freight Terms of data type Option Set, where options are defined as follows.

    Screenshot that shows the Will Call option selected and its value set to 7.

  • Address 1: Shipping Method of data type Option Set, where options are (from 1 to 7).

    Screenshot that shows the Net 60 option selected and its value set to 4.

  • Payment Terms of data type Option Set, where options are (from 1 to 4).

    Screenshot that shows the Check option selected and its value set to 7.

All the above Microsoft Dynamics 365 for Sales option sets are mapped to options in Dynamics NAV.

Note

Do not rename records in tables mapped to Microsoft Dynamics 365 for Sales options as that will break the synchronization of the renamed options.

Extending Option Sets in Microsoft Dynamics 365 for Sales

  1. Add the three new options, with values from 5 to 7.

    Screenshot that shows the Check option selected and its value is set to 7.

  2. Test that you can access the new options in the CRM Account table.

    Screenshot that shows Transfer selected in the Payment Terms field.

Note

Make sure that the first ten characters of the new option value names are Microsoft Dynamics 365 for Sales are unique. For example, two options named "Transfer 20 working days" and "Transfer 20 calendar days" will cause a failure because both have the same first 10 characters, "Transfer 2". Name them, for example, "TRF20 WD" and "TRF20 CD".

Extending the CRM Account Table in Dynamics NAV

You can now regenerate the CRM Account table, either with the related PowerShell script or by modifying the table manually.

  1. Modify the PaymentTermsCode field by adding new options.

    Screenshot that shows Cash Payment, Transfer, Check highlighted in the Option String field.

  2. The OptionOrdinalValues property is not visible in the Development Environment, but you can update it in the text object.

    Screenshot that shows Cash Payment, Transfer, Check highlighted in the Option String field. 5 6 7 is highlighted in the Option Ordinal Values field.

Update the CRM Option Mapping table

Now you can recreate the mapping between Microsoft Dynamics 365 for Sales options and Dynamics NAV records.

In the Integration Table Mapping window, select the line for the Payment Terms map, and then choose the Synchronize Modified Records action.

Screenshot that shows the Synchronize Modified Records option selected in the menu.

The CRM Option Mapping table is updated.

Screenshot that shows the CRM Option Mapping table.

The Payment Terms table in Dynamics NAV will then have new records for the Microsoft Dynamics 365 for Sales options. (New options are in bold font below. Yellow rows represent all options that can now be synchronized. Gray rows represent options are not in use and will be ignored during synchronization. You can remove them or extend Microsoft Dynamics 365 for Sales options with the same names.)

Screenshot that shows the Payment Terms table with some rows highlighted yellow and some highlighted gray.

See Also

Customizing Dynamics 365 for Sales and Dynamics NAV Integration
Setting Up Dynamics 365 for Sales Integration in Dynamics NAV