We are trying to set up our first integration between NAV and CRM using the Connector for Microsoft Dynamics. We have managed to set up the "basic" integration, meaning the default maps that comes with the connector (NAV customers to accounts in CRM, etc.), but our client also wishes to integrate the customer ledger entry table. They wish to see customer balance in CRM. We believe that we have followed the correct steps to do this, but we are unable to integrate the table.
We have added code to the functions EnableConnector, SetupIntegrationTables, and IsIntegrationRecord in codeunit 5150. When we enabled the connector (ticking field "Enable Connector" in marketing setup) we checked that the customer ledger entries page was published and that records related to customer ledger entry table was added to tables Integration Page and Integration Record. When new records are added to customer ledger entry we have checked that the integration record is updated correctly.
So it looks like everything is correct in NAV. We are also able to select customer ledger entry in the connector and set up a new map, selecting fields from the customer ledger entries page and mapping these fields to a customized table in CRM. Everything looks good, but when attempting to activate the map in the connector no records are integrated. The error "Failed to read Entity keys from Microsoft Dynamics NAV" is returned in the log.
Here is some more detailed information from the log;
Map: NAV Cust. Ledger Entries to Kundepost
Text: [NAV Cust. Ledger Entries to Kundepost] has encountered an error. Processing will be aborted. Exception occurred in Microsoft Dynamics NAV
Error Code: Microsoft.Dynamics.Integration.Adapters.Nav2009::0x80131501
If anybody can help us resolve this error then we would appreciate it very much, because we are at a loss.