Migration of Invoices from Microsoft Dynamics CRM to Microsoft Dynamics NAV - CloudFronts

Migration of Invoices from Microsoft Dynamics CRM to Microsoft Dynamics NAV

Posted On May 4, 2016 by Admin Posted in 

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 TIBCO Cloud Integration as Integration Tool.

Prerequisite:

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

Step 1: Login to TIBCO Cloud Integration

  1. Login to TIBCO Cloud Integration (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. TIBCO Cloud Integration 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

The flow for creating the Invoice and its related invoice product is as follows:

Fig. TIBCO Cloud Integration 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.

Fig. Customer in Dynamics NAV

 

    1. Create an invoice with this customer in CRM and Run the Map.

Fig. Invoice in Dynamics NAV

 

An invoice is created with that customer in NAV.

 


Share Story :

Secured By miniOrange