The Microsoft Dynamics NAV ‘Tenerife’ Developer Preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.

Integrating Dynamics 365 for Sales for Extension Development

Develop extensions and streamline the workflow by synchronizing the Sales data from Microsoft Dynamics 365 for Sales with Dynamics 365 for Finance and Operations, Business edition and Dynamics NAV.

For developing extensions to integrate with sales data, you simply enable the tables used in Dynamics 365 for Sales. The extension development process includes the following set of properties to enable field mapping. You can enable the field mapping by using the following properties.

Associated table and field properties

The following properties are used for integrating with Microsoft Dynamics 365 for Sales:

Properties Applies to Description
TableType Property Tables Specifies the table type. This enables the table to integrate with the external database. For example, CRM.
ExternalName Property Tables, Fields Specifies the name of the original table in the external database when used as a table property.

Specifies the field name of the corresponding field specified in the external table when used as a field property.
ExternalAccess Property Fields Specifies the access to the underlying CRM entity when CRM tables are generated using the cmdlet.
ExternalType Property Fields Specifies the data type of the corresponding field in Dynamics 365 for Sales table.
OptionMembers Property Fields Sets the option values for a field, text box or variable.
OptionOrdinalValues Property Fields Specifies the list of option values. You can set this property, if the ExternalType is set to Picklist.

Enabling the entity

Typically in Dynamics 365 for Sales, entities handle the internal processes. In order to access to the underlying CRM entity, you use the TableType property and select the value called CRM. This enables the table as an integration table for integrating Dynamics 365 for Finance and Operations, Business edition and Dynamics NAV with Dynamics 365 for Sales. The table is mainly based on an entity in Dynamics 365 for Sales, such as the Accounts entity.

Snippet support

Typing the shortcut ttable will create the basic layout for a table object when using the AL Extension in Visual Studio Code.


In the following example, the SalesIntegration table uses the TableType and ExternalName properties to link the underlying CRM entity for mapping the fields from the Sales table with the specified fields.

table 50100 SalesIntegration
    TableType = CRM;
    ExternalName = 'Sales';

        field(1; ActualSales; Integer)
            ExternalName = 'ActualSale';
            ExternalAccess = Full;
            ExternalType = 'String';                        

        field(2; SalesCategories; Option)
            ExternalAccess = Read;                        
            ExternalType = 'Picklist';
            OptionMembers = Manufacturing, Marketing, Support;
            OptionOrdinalValues = -1, 1, 2;

See Also

Table Properties
TableType Property