4 May’16

BIMigration of Invoices from Microsoft Dynamics CRM to Microsoft Dynamics NAV

Consider a scenario where we want the Invoice generated in Microsoft Dynamics CRM to be saved in an ERP.

In this article, we will migrate the invoice that is generated in CRM to Dynamics NAV using scribe online as Integration Tool.


  1. CRM Online environment
  2. Dynamics NAV
  3. Scribe Online subscription
  4. Scribe Online On-Premise Agent on the server where Dynamics NAV is installed

Step 1: Login to Scribe Online

  1. Login to scribe online (https://online.scribesoft.com/) in the server where Dynamics NAV is installed
  2. Go to Agents and create Agent from NEW option
    Install On-Premise Agent and copy the Agent key as well
    After installation, you can provide the name for the agent

Step 2: Creation of Source and Target connection.

  1. Creating a new connection for CRM environment:
    Select ‘Microsoft Dynamics CRM’ as the Type.
    Provide the connection details and select ‘Cloud Agent’ for CRM Online environment as shown in screenshot below.

    Fig. Connection for Dynamics CRM


  2. Creating a connection for Dynamics NAV:
    Select Microsoft Dynamics NAV as the Type.
    Provide the connection details and select the On-Premise Agent which is installed on the server where Dynamics NAV is installed. Refer below screenshot for the same.

    Fig. Connection for Dynamics NAV


Step 3: Creating solutions for maps

  1. Create a new solution.
    Select the On-Premise Agent.
    Create Advanced Map.

    Note: There will be two Advanced Maps in the solution. One for ‘Account’ entity migration from CRM to NAV and one for ‘Invoice’ entity migration from CRM to NAV.

  2. In the Map for Account migration:
    1. Select source connection as the CRM connection
    2. In the Query block select ‘Account’ entity
    3. Select the target connection as the Dynamics NAV connection
    4. In the Create block of the target connection select ‘NAVCustomer’ entity
  3. In ‘Create’ block map the required fields.
    Also we need to use the ‘Update’ block to update the ‘No’ field generated for a Customer in NAV to the ‘accountnumber’ field in CRM.
    We use the ‘accountid’ field as the matching criteria in the update block.

    Fig. Scribe Online Map for Account migration


  4. In the Map for Invoice Migration:
  1. Select source connection as the CRM connection
  2. Select ‘Invoice’ entity in the query block
  3. Add invoicedetail as ‘Related entity’ in the Query block
  4. Select the target connection as Dynamics NAV connection
  5. The flow for creating the Invoice and its related invoice product is as follows:

    Fig. Scribe Online Map for Invoice migration

    Step 1: Lookup on account entity in the source and fetch its accountnumber field (which will contain the No that we have updated in the Account migration map).

    Step 2: Lookup on ‘NAVCustomer’ entity by using the accountnumber fetched in Step 1 as matching criteria and fetch its Name.

    Step 3: Use ‘Create’ block to create the Invoice entity in NAV. Select ‘NAVInvoice’ entity in the create block. Map the fields required.

    Fig. Mapping for Create block in NAVInvoice


    Step 4: Use ‘For each child’ block for fetching the products present on that particular invoice.

    Step 5: Use create block in the ‘for each child’ block and select ‘NAVInvoiceSalesLines’ entity.

    Fig. Mapping for Create block in NAVInvoiceSalesLines


Step 5:Execution of maps for account and invoice entities.

  1. Account is updated in CRM.

    Fig. Before execution of CRM account


    Fig. After execution the AccountNumber is populated with the No that is generated in NAV


  2. Customer is created in NAV.
  3. Fig. Customer in Dynamics NAV


  4. Create an invoice with this customer in CRM and Run the Map.
  5. Fig. Invoice in Dynamics NAV


    An invoice is created with that customer in NAV.


    Written by

    Team Member


Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Reading more then 10K records in D3FOE OData API

    11 July’ 2018

    Introduction: We all know Dynamics 365 Finance and Operations has limitation of 10K records to be fetched at a time usi...

    Read more
  • Paging in D365 Customer Engagement v9.0

    10 July’ 2018

    Introduction: The Xrm.retrieveMultipleRecords method is used to retrieve a collection of records in Dynamics 365 Custom...

    Read more
  • Set up Dynamics 365 connection in Microsoft Social Engagement

    10 July’ 2018

    Introduction: This blog explains how to Set up Dynamics 365 connection in Microsoft Social Engagement. Steps to be follo...

    Read more
  • Voice of the Customer failed to install

    10 July’ 2018

    Introduction: Many people face issues in installing Voice of Customer solution on v9 environment and trying repeatedly ...

    Read more
  • Scribe Insight AX as a Web Service Find Block issue

    10 July’ 2018

    Introduction: If we need to look up for any value from AX then we do it by using a Find Block in Scribe Insight Eg: Basi...

    Read more