Share via


Troubleshooting: Integrating with the Connector for Microsoft Dynamics

This topic describes some common problems that you may see when you use the Connector for Microsoft Dynamics.

Enabling web services to work with the Connector for Microsoft Dynamics

By default, web services are not turned on in Microsoft Dynamics NAV. For the Connector for Microsoft Dynamics to work correctly, you must expose pages as web services.

For more information, see How to: Publish a Web Service.

Resolving a web service exception about callback functions

When using Microsoft Dynamics NAV web services, the web service call may return a fault with one of the following messages:

  • Client callback (such as showing Pages) is not supported when executing custom Web services.<Additional information about the error from the dialog box>

  • Callback functions are not allowed.

The first error generally occurs because the web service has accessed application code that contains either a Confirm or StrMenu dialog box or a Page type. These types of dialog boxes require user input, which cannot be handled when using the web service. The web service call then includes a detailed message with information from the dialog box, which you can then use to analyze the reason for the callback.

To resolve this error, make sure that the web service call does not call code that contains a Confirm or StrMenu dialog box or a Page type, or modify your Microsoft Dynamics NAV solution to allow data to be inserted or modified without any user interaction.

The second error generally occurs because the web service has accessed other application code that requires interaction with a client, such as a call to a client-side COM object.

To resolve this error, make sure that the web service call does not call code that requires interaction with a client, or modify your Microsoft Dynamics NAV solution to allow data to be inserted or modified without such interactions.

Resolving issues when reinstalling Microsoft Dynamics NAV and starting the Connector for Microsoft Dynamics

When you reinstall Microsoft Dynamics NAV and then try to start the Connector for Microsoft Dynamics, you may see the following message:

Object reference not set to an instance of an object.

To resolve this error, enable the Connector in Microsoft Dynamics NAV, verify that Microsoft Dynamics NAV web services are turned on, and then start the Connector for Microsoft Dynamics again.

Resolving issues with Marketing Setup and inheritance of contact information when you are using Connector for Microsoft Dynamics

If you have selected the inheritance fields in the Marketing Setup window on the Inheritance FastTab, you will overwrite information on a contact if you link the contact to a parent customer in Microsoft Dynamics CRM.

After you integrate a contact from Microsoft Dynamics CRM, the contact will be assigned the address and communication information of the parent customer after synchronization with Microsoft Dynamics NAV, rather than the address information of the contact. If you subsequently link this contact to a parent customer, the contact information will be overwritten in Microsoft Dynamics CRM with that of the parent customer. This also occurs if you have a solution in which you integrate from Microsoft Dynamics CRM to Microsoft Dynamics NAV and then back to Microsoft Dynamics CRM.

To avoid this issue, do not use the marketing inheritance features at the same time that you are using Connector for Microsoft Dynamics to integrate Microsoft Dynamics NAV with Microsoft Dynamics CRM. In the Marketing Setup window, on the Inheritance tab, clear all check boxes.

Encountering sales order integration issues where credit limits have been exceeded or items are out of stock

Orders that exceed the credit limits that you have set up in Microsoft Dynamics NAV or for which items are out of stock can be integrated from Microsoft Dynamics CRM but will not issue any warnings.

To resolve this error, you may have to establish a process to postprocess sales orders.

Synchronizing sales orders that use local currency (LCY)

Typically, when you set up sales orders in Microsoft Dynamics NAV, you must also specify the currency code. If you do not specify a value, then Microsoft Dynamics NAV treats this as though you had set the value to local currency (LCY). In many instances, moreover, Microsoft Dynamics NAV code has the following logic:

If Currency Code <> ''

Then . . . // Logic where currency code is different from local currency.

To ensure the expected synchronization behavior, examine the connector maps and update them as necessary. The local currency code is not created in a standard implementation. It is therefore necessary to set up a special map for each implementation that transforms and sets the LCY coming from Microsoft Dynamics CRM to "" when a sales order is synchronized to Microsoft Dynamics NAV.

Treatment of posted sales orders after reenabling Connector for Microsoft Dynamics

You can synchronize sales order information between Microsoft Dynamics NAV and Microsoft Dynamics CRM. When you post a synchronized sales order in Microsoft Dynamics NAV, the sales order record is deleted in Microsoft Dynamics NAV, and a posted sales invoice is created. The corresponding integration record is not marked as deleted, and Microsoft Dynamics CRM maintains the status of the sales order as New.

If you subsequently disable and then enable Connector for Microsoft Dynamics again after you have posted a sales order, however, Microsoft Dynamics NAV marks the integration record as deleted, and the status of the order record in Microsoft Dynamics CRM is changed to Cancelled.

Renaming Microsoft Dynamics NAV records may lead to changes in integrated records

When you have enabled the Connector for Microsoft Dynamics, you may encounter an error if you try to rename records. The error message states that you cannot rename records in the RoleTailored client if the renaming action would affect other records. The message is there to help you avoid data loss.

To resolve this issue, do one of the following:

  • Remove the links.

  • Rename the record and establish the links again.

  • Start the Classic client and rename the record.

Integrating with Microsoft Dynamics CRM when you use C/FRONT or other direct database access

When you are integrating your Microsoft Dynamics NAV database with Microsoft Dynamics CRM, we recommend that you integrate your database modifications and deletions with web services. If you cannot do this and are using direct database access, then the following limitations apply. In Microsoft Dynamics NAV, you can use the Generate Integration IDs for Connector for Microsoft Dynamics function to add or update integration IDs for records that you create or modify in a database through direct database access. However, you cannot integrate records with Microsoft Dynamics CRM that have been deleted with a tool that performs direct database access. If you use such a tool to delete records that already have an integration record and it does not call C/AL code, then your deletion will not be integrated with Microsoft Dynamics CRM.

To resolve this issue, use the following procedures to modify your data. You should review the Integration Management codeunit, which has basic functionality for Create, Modify, and Delete operations.

To add a new record to a table

  1. Insert a corresponding record in the Integration Record table, and then set the following fields.

    Field ID Field name Description

    1

    Table ID

    Number of the table in which the new record was inserted.

    2

    Page ID

    Number of the page from which you read the record from web services.

    3

    Record ID

    Record ID for the inserted record.

    5150

    Integration ID

    Integration ID (GUID) of the new record. Set to a new GUID.

    5151

    Deleted On

    Date and time information for the deleted record. This should be empty.

    5152

    Modified On

    Date and time information for the modified record. This should be set to the CURRENTDATETIME.

    For more information, see Integration Record.

To modify an existing record

  1. Modify the record.

  2. In the Integration Record table, locate the corresponding record, which in some cases could be the header record, and then update the time stamp information in the Modified On field.

    Note

    If you have updated the primary key, then you should also recursively update any records that refer to that primary key.

To delete an existing record

  1. Delete the record.

  2. In the Integration Record table, locate the corresponding record, which in some cases could be the header record, and then update the time stamp information in the Deleted On field and clear the value in the Record ID field.

See Also

Other Resources

Integrating Microsoft Dynamics NAV with Microsoft Dynamics CRM