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

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more