NAV – Connecting Microsoft Dynamics CRM customized entities - Blogs
X

Reason:


  • NAV and CRM can be integrated using inbuilt standard features. However, there are certain scenarios where CRM have new / customized fields. These data if required in NAV, then you’re at the right blog to see ‘How-To-Do’ this.

Who can do it?


  • Knowledge of NAV Development
  • Knowledge of NAV Table objects
  • Basic knowledge of PowerShell commands
  • Basic knowledge of CRM, its Entity and Fields

Pre-requisites:


  • NAV 2016 or above
  • Access to NAV Development environment and NAV developer’s license
  • CRM access (credentials and connecting URL required)

Steps:


  1. IDENTIFICATION-
    1. In CRM, identify all Custom fields in Entity. (just for cross-verification later)
    2. Fig1
    3. These fields will be required in NAV as well.
    4. What in case if there is any new Entity in CRM which need to relate to NAV? (Ans: I will show steps for that too)
    5. Fig2
    6. Now, what do you think is required to connect this entity and field with NAV?
      1. Maybe same table structure in both application’s DB? (yes)
      2. Connectivity between NAV and CRM? (yes)
  2. TABLE MAPPING-
    1. In NAV, we can either use existing table or create new table-
      1. When to go for new NAV table, if-
        • New Entity in CRM disconnected with NAV
        • Existing Entity in CRM disconnected with NAV
      2. When to modify existing NAV table, if-
        • Existing Entity in CRM connected with NAV
        • New fields to be added in NAV
        • Fields to be deleted/disabled in NAV
    2. Below are steps to create new NAV table which will relate to CRM entity-
      1. Very simple!! Just execute a Windows PowerShell command (with Administrator rights).
      2. After you import required PowerShell script of NAV, you can use ‘New-NAVCRMTable’ command.
      3. Fig3
      4. How this command works and parameters required to generate something? (Answer on next point)
      5. Consider a sample command ‘New-NAVCrmTable -Credential (Get-Credential -UserName crmnav@xyz.com -Message "Enter Password") -CRMServer https://..com/crmnav -EntityLogicalName -ObjectId

Parameters

Description

Example(s)

-Credential

Specifies a credential required to connect to provided CRM Server

I’ve used ‘Get-Credential’ command of Windows PowerShell which is more secure way.

-CRMServer

Server details of CRM. It is basically in URL format.

-CRMServer https://..com/crmnav

Or

-CRMServer https://..com/

-EntityLogicalName

This is Entity name of CRM. This can be identified in step 1. d.

-EntityLogicalName quote

Or

-EntityLogicalName salesorderdetail

-ObjectId

This is new NAV Table object ID which will be created by PowerShell.

-ObjectId 50000

-Name

This is new NAV Table object name which will be created by PowerShell

-Name “CRM Sales Quote”

Or

 -Name “XYZ Table”

-OutputPath

This is file path where PowerShell will generate and export .txt file of NAV Table object

-OutputPath C:\FilePath\

Or

-OutputPath D:\FilePath\

  1. After successful execution of PowerShell command, it generates a .txt file with ‘T’ as a prefix followed by Object id. For example, T50000.txt
  2. Import .txt object file in NAV and compile it
  3. New Table object will be created in NAV with all fields available in CRM’s entity
    • This table will not run until ‘CRM Integration’ is enabled in NAV
  4. TABLE thing DONE 😊
  1. Below are steps to work on exiting NAV table which will relate to CRM entity-Below are steps to work on exiting NAV table which will relate to CRM entity-
  1. You need to follow all the steps in 2.b
  2. Beware, do not directly import or replace existing NAV table.
  3. Here additional work will be to merge existing NAV Table object’s text and recently created NAV Table object’s text (from step 2.b.vi.)
    • This may include merging of new fields
    • Merging of field properties
    • Merging of new field type (rare case)
  4. After successful merging, you need to import merged object in NAV and compile
    • This table will not run until ‘CRM Integration’ is enabled in NAV
  5. Pretty Easy!!

 

  1. FIELD MAPPING-
    1. Field mapping is only required when existing NAV Table object is modified.
    2. All CRM fields in Entity will be readily available in a .txt file which was generated from above steps.
    3. Hence, no manual work in this case.

      mail Feel free to mail me on manish.kutar@ecanarys.com if you need any further information on this

Related

NAV – Connecting External SQL

This blog is intended to see how Microsoft Dynamics NAV (here onwards NAV) can be connected to exter...

Read More >

What's New in Microsoft Dynamics NAV 2017

We were hearing about Dynamics NAV 2017 since long time that it will be releasing by the end of 2016...

Read More >

How to run NAV 2015 and NAV 2016 Administration tool side by side

Everyone would have installed NAV 2016 RTM and would have faced the same problem, i.e, you couldn...

Read More >

What’s new: Extension for Microsoft Dynamics NAV 2016

We all have seen the situation where we need to put in lot of efforts to modify the standard NAV obj...

Read More >

Identify and stop idle Dynamics NAV sessions using User Session Control Addon

Since the advent of RTC clients and 3-tier architecture of Dynamics NAV, it’s been a question ...

Read More >

Autofill RecVariable Name in DynamicsNAV 2015

I discovered something quite interesting couple of week back and I thought it was worth sharing.When...

Read More >

Phenomenal growth of Microsoft Dynamics NAV

There has been phenomenal growth in terms of organizations adopting Microsoft Dynamics NAV in the la...

Read More >

How to Remove the Departments Action Button in NAV 2015

Some customers may not want to use Departments menu available. We need to have some option to remove...

Read More >

How to print Header and Details (Lines) in different pages of a RDLC Report in NAV 2013 R2

We usually print header and details section of a document on same page, what if we want to print on ...

Read More >

How to print TransHeader and TransFooter in Microsoft Dynamics NAV RDLC reports

We know that TransHeader and TransFooter section types were available in NAV 2009 version but there ...

Read More >

Share

Try DevOpSmartBoard Ultimate complete Azure DevOps End-to end reporting tool

Sign Up

  • Recent
  • Popular
  • Tag
Tags
Monthly Archive
Subscribe
Name

Text/HTML
Contact Us
  • *
  • *