Using Azure Functions to Call Dynamics 365.

Credits…Original Post by Nishant Rana (Big Thanks!).

Here is an example of a simple Azure Function that refers our CRM assemblies and creates contact record in CRM.

Log in to Azure Portal, and perform the following actions:

  • Optionally, Create a Resource Group, so that it is easy to maintain the resources.
  • Search for “Function App” and create one. NOTE: The App Name of the Function App should be a globally unique name.

  • Add (+) a new function (GenericWebHook-Csharp template)

  • This creates a new function (“CallCRMApps” in this example).
  • Select the function, and under View Files (Right end of your screen), add a new file and give it a name, for example “project.json”. NOTE: It is within this file we will refer our Nuget Packages that we need in our function.

  • Click on project.json and write the following code:

NOTE: At the time of writing this article the latest version of Nuget was “”.



“frameworks”: {


“dependencies”: {

“Microsoft.CrmSdk.CoreAssemblies”: “”





  • Click Save and Run and notice the Log (bottom of the screen).

  • Now click on run.csx file. Write the following sample code for the Azure Function. Please replace the highlighted Organization Serve with your D365 Organization Service Endpoint Address, also the username and password for your D365 environment.


using System.Net;

using Microsoft.Xrm.Sdk;

using Microsoft.Xrm.Sdk.Client;

public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)


log.Info(“C# HTTP trigger function processed a request.”);

// parse query parameter

string firstname = req.GetQueryNameValuePairs()

.FirstOrDefault(q => string.Compare(q.Key, “firstname”, true) == 0)


string lastname = req.GetQueryNameValuePairs()

.FirstOrDefault(q => string.Compare(q.Key, “lastname”, true) == 0)


IServiceManagement<IOrganizationService> orgServiceManagement = ServiceConfigurationFactory.CreateManagement<IOrganizationService>(new Uri(“<your organization service>“));

AuthenticationCredentials authCredentials = new AuthenticationCredentials();

authCredentials.ClientCredentials.UserName.UserName = “<username>“;

authCredentials.ClientCredentials.UserName.Password = “<password>“;

AuthenticationCredentials tokenCredentials = orgServiceManagement.Authenticate(authCredentials);

OrganizationServiceProxy organizationProxy = new OrganizationServiceProxy(orgServiceManagement, tokenCredentials.SecurityTokenResponse);

Entity contact = new Entity(“contact”);

contact.Attributes[“firstname”] = firstname;

contact.Attributes[“lastname”] = lastname;

var contactId = organizationProxy.Create(contact);

// Get request body

dynamic data = await req.Content.ReadAsAsync<object>();

string fullname = “”;

return fullname == null

? req.CreateResponse(HttpStatusCode.BadRequest, “Please pass a name on the query string or in the request body”)

: req.CreateResponse(HttpStatusCode.OK, “Contact created in CRM ” + contactId.ToString());


NOTE: To get your organization service , in your D365 environment click, Settings, Customizations, Developer Resources and copy the Endpoint Address under Organization Service.

Test Function

Add a query under Test tab to enter the First Name and Last Name (click + Add parameter) and click Run.

If your query is OK, you will get a Status: 200 OK and the output stating that a new Contact is created in D365.

Check the D365 Contact and search for the contact.

Connect Power BI Desktop to Dynamics 365

Do you want to connect to hundreds of data sources, simplify data prep, and drive ad hoc analysis, produce beautiful reports, then publish them for your organization to consume on the web and across mobile devices. Well, then you can use the Power BI suite of business analytics tools that deliver insights throughout your organization. You can create personalized dashboards with a unique, 360-degree view of your business, and scale across the enterprise, with governance and security built-in. For more resources on Power BI, click here.

The following article explains how you can connect Power BI Desktop with Dynamics 365.

Copy URL from Dynamics 365

  1. Log in to Dynamics 365.
  2. Click Settings > Customizations > Developer Tools.
  3. Copy the URL under Instance Web API (save it for further use).

Connect Power BI to Dynamics 365

  1. Open PowerBI Desktop and click Get Data > Dynamic 365 (online) and click Connect.
  2. Enter the Web API URL and click OK.
  3. On the OData Feed, click Organizational Account.
  4. Click Sign in to enter your credentials. When you see the message “You are currently sign in.”, you can click Connect.
  5. On the Navigator, select the entities to load into PowerBI and click Load.
  6. The data and entity fields are loaded into PowerBI Desktop. You can now start building reports.

Task Management



When you click To-dos, you will get overview of all the To-dos in the system.

Every To-do will have a Status and based on the status you can look, filter and sort if you want to pay attention to those that are not completed.

Mostly the To-dos are used in the context of opportunities, where you can assign To-dos and Activities to opportunities. However, you can also create to-dos which are not related to opportunities.

So when you open such a To-do, you will see very typical information such as It has a Number and a Description; It is assigned to a salesperson; It is a to-do for specific contact; You see the Status, the Priority, the Starting Date and the Ending Date.

Under Related Activities fast tab, you can really track or find the origin of this to-do, for example in this case the to-do is related to an opportunity. To-do can also be related to campaign.

You can also make a to-do recurring as well.

You can also define the Type of to-do, which can be Blank, Meeting and Phone Call. You can synchronize this between Outlook and Relationship Management.

A Phone Call type to-do is typically an activity which is caused by phone call which can have a link with an interaction.

Send E-Mail Meeting Invitations


You need to create a to-do of the meeting type with Annette Hill as the to-do organizer and with an Beebe and Yvonne McKay as the meeting attendees. Moreover, you need to send the invitation to Yvonne McKay.


Edit all the relevant contacts and check if the communication details are available.

Open Sales people (Annette Hill) and create To-do.

Use the wizard to create the To-Do.

Make Annette Hill the To-Do Organizer and make Richard Lum and Yvonne McKay as attendees.

Specify relevant template for e-mail invitation.

Finish the wizard.

Select the To-Do just created and Edit the To-do.

Navigate to Attendee Scheduling.


Edit Attachment as required and save it.

Make sure the Send Invitation field is selected and click on the Send Invitation action.

This will send invitation to all the recipients.

Delete Cancelled To-Dos

You can use Delete Cancelled To-dos batch job to clean up all the cancelled To-dos from the database. You can make use of various filters while running the batch job.

Campaign Management

A campaign is any sort of activity that involves a number of contacts. It can be anything from sending out catalogue and special offers to organizing a special event.

You can record contact responses to campaigns as interactions, which means that a response to a campaign becomes an interaction in Dynamics NAV, and that interaction linked with the campaign.

Setting up Campaigns

Campaign Status Codes

Click Departments/Sales & Marketing/Marketing/Status under Campaign.

Here you can define campaign status codes or use the preconfigured ones as shown in the following example.

The purpose of these campaign status codes is to track the status of your campaign. Once you have configured these campaign statuses, you can start working with the Campaigns.

Click Departments/Sales & Marketing/Marketing/Campaigns to open campaigns.

So, if you Edit a campaign, for example Event campaign in this case, you will see that:

  • It has a number
  • It has a description
  • It has a status code, which you can configure.
  • It has a starting date and an ending date
  • It has a link to the salesperson
  • It has a status to show if the campaign is activated or not
  • You can find invoice details, if you have links with sales orders and so on

From the campaign, you can click on Navigate and click on Opportunities to see if there are any opportunities linked to the campaign.

In the same way you can also track the Segments, a subset of contacts that you have linked to the campaign.

Similarly, you can click on Entries, to see is there are any Interaction entries logged for the specific campaign.

If you want to do more than tracking responses for instance, you can also configure specific Sales Prices for a campaign. For instance, for a specific item or for a number of items, you can specify a minimum quantity and specific unit price during a specific starting and ending date.

Now, these will only have impacts on your quotes and orders, if you have the Sales process or Discounts. And the moment that you activate these sales prices and discounts, that is also the moment that you campaign will be activated.

Creating Interactions for Campaigns

After you have created a campaign, and maybe you have already initialized some actions like e-mail campaign which was sent out to a segment of contacts, you might expect, for instance, some reactions to that campaign.

These reactions can be recorded as interaction, and that is simply done by providing a campaign code in the interaction window.

The interaction will then be tagged by a campaign code and you can later view the recorded interaction in the campaign Entries window.

So, for example, let us assume that you activated and released a new spring campaign with new prices and so on. You send out an e-mail and Beef House is registered. You receive a phone call from Beef House showing interest.

So you select the contact Beef House and click Create Interact.

Follow the create interaction wizard to create the interaction. While following the wizard, choose the Campaign details. You can also assign opportunities to this campaign.

When all the details are specified, Finish the wizard.

Now, select the campaign, Spring offer in this example, and Navigate to Entries. You can see the campaign entries. To look more about the campaign entries, you can select the entry and click on Interaction Log Entry for more details.

This way, we can basically make interactions from reactions and then they are linked to the campaigns.

Interactions and Document Management

Setting up Interactions

Interaction Templates & Attachments

To open Interaction Templates, click Departments/Sales & Marketing/Setup/Interaction/Interaction Templates.

In the following view, you will find all the pre-configured interaction templates:

  • Each template is identified by a code providing you are short explanation on what the template is all about, such as abstracts of meeting, business letters, e-mail, invite for a golf event etc.
  • You will see that the templates are linked to an Interaction Group Codes, which you can also configure yourself, such as document, letter, meeting, phone, etc. This means that you can group the interaction templates.
  • You can specify a short description for each interaction template.
  • You will also see a Wizard action. This can be blank, import or open.
    • Open
      Typically, you use wizard to open if you have an attachment included. To see how the attachment looks like, for example, select the Business Letter (BUS) interaction template and click Open under Navigate tab. You can see that the template contains a number of merged fields that come out of the database, such as company information, contact mail address, etc. You can also add more. So you have a nice pre-defined template that everybody is going to use when they are interacting, by using this business letter interaction template. So that causes some kind of standardization within the organization. If there is no attachment, you can also create one, by using the Create action. You can also replace existing attachments by using Copy From action.
    • Import
      If the wizard action is Import, the system will ask you to insert an external document.

  • You can also define attached duration and costs.
  • You can identify whether this is inbound or outbound and initiated by us or the other party.

NOTE: You can have multiple version of interaction templates which can be language specific as well.

Record Interactions

Manually Record Interactions

Let us assume that we would like to create an interaction or record or administer an interaction with A. Gibson”s Law Firm.

Open the A. Gibson”s Law Firm contact card and click on the Create Interaction action, which will open the Create Interaction Wizard.

This wizard helps you to create interactions and record information, by moving to Next pages and then finally Finish the wizard.

Example of using a Wizard:

Let us say, we fill in the following details:

  • What is the type of Interaction? = ABSTRACT
  • Who is the salesperson responsible? = AH (Anette Hill)
  • Describe your interaction = Meeting Today

  • Click Next. This is probably an interaction template that is using a wizard to open an attachment.

  • When you click Next in this example, an attachment will open up. So you can start filling in the text.

  • Save and close the document. Click Yes on the confirmation dialog.

  • If you want, you can continue and fill in some more information in the wizard or click Finish.

So this is how you record your interactions manually. Once recorded, you can always look back through all your recorded interactions for your contact.

On the contact card you will see a calculated field depicting the date if the last interaction. You can click on it to see the interaction log entries., form where you can start consulting or checking the interactions.

Or, from the contact card you can also, click on Interaction Log Entries on the Navigate tab to do the same.

On the Interaction Log Entries page, you can select the relevant record and click Show for more details.

Automatically Record Interactions

Automatic recording of interactions shows the full integration of ERP with Relationship Management. With the help of this seamless integration Salespeople can actually see all the relevant information of contact from one place in Microsoft Dynamics NAV and this really means all interactions like quotes, order, invoices and reminders. So salespeople can find all information in one environment rather than navigating around other modules.

Interaction Template Setup

First we need to perform some setup, before we can use this feature.

Click Departments/Sales & Marketing/Setup/Interaction/Interaction Template Setup.

This will open the configuration setup related to Interaction Templates.

What we see here is that we have Sales, Purchases and Service. So for these domains in our ERP we can configure the system to automatically keep track of certain interactions.

For example, for Sales we can say that each time an invoice is created, or a credit memo or an order confirmation of a statement or a reminder, that in each of these cases, an interaction for the contact that is synchronized with the customer, for instance, will be created.

You can specify Interaction template for each case. You will notice that the interaction templates specified for automatic recording, do not have Wizard Action and Attachments.

Viewing the Recorded Interactions

You can select a contact, for example Beef House in this case, and navigate to Interaction Log Entries from the contact list page.

Here you will see a number of interactions that were created automatically for a particular contact. You can click on Show to see more details.

So salespeople do not need to move to customers and to look to all the posted documents and in historical folders and so on, but can rather access all the information from one place.

Postponing Interactions

Let us assume that the company Beef House has called and we would like to register this call as an interaction.

So we go ahead, select the contact and click Create Interact. We register this as an incoming call.

However, let us say, while working on it something intervenes and we need to close this wizard. When we try to close the wizard, NAV asks us if we would like to finish this interaction later?

As soon as we click Yes, Nav will record that as a postponed interaction. So later we can, navigate to Postponed Interactions and Resume the process to start working on it again or Delete it, if we do not need t anymore.

Opportunity Management

When we say Opportunity Management in Dynamics NAV, we mean sales opportunities.

Opportunity Management Setup

Sales Cycle

A sales cycle is:

  • The course of time between the initial contact being made with a customer the transaction that completes the sale.
  • A measure of the efficiency of a sales department.
  • A breakdown of what happens in our sales processes in our sales cycle.

We can track the lifecycle of our opportunities in Dynamics NAV by using the sales cycle functionality.

You can create as many sales cycles as you want. You should leverage it with what you really do in your sales process.

To create a new sales cycle or to view an existing one, click Departments/Sales & Marketing/Sales/Setup/Opportunity/Sales Cycles.

A sales cycle exists out of different steps, and we call them Stages. To create stages for a sales cycle or to view stages of an existing sales cycle, selected the sales cycle and click on the Stages under Navigate tab.

Each of the stages represent percentage of completion of your sales cycle, specified in Completed % field. For instance, when we have initialized the sales process, we are 2% complete, when we understand the needs, it is 35% complete, and so on. These completed percentages can be later on used to calculate the value of your sales cycle.

You can also attach Activity Code for each step of the sales cycle, which represents a corresponding task. For example, set of to-do for specific representative. You can use the to-dos in combination with date formulas, so you can really plan when a to-do needs to be executed. These date formulas also serve a purpose for the Opportunity Details Report, where it displays planned activities on certain dates.

For some of the stages quotes are required. It means that in Dynamics NAV there is a sales quote for an opportunity available. If the Quote Required field is selected for a particular stage, you will not be able to proceed to the next stage, without first making a quote and assigning it to the opportunity.

If the Allow Skip field is selected, you can immediately jump to the next stage.

We can plan these stages with Date Formula, however if we already have Date Formulas specified in activity codes, we would prefer that, else we can use it in the sales cycle stages.

NOTE: You can Block a sales cycle, which means that you will not be using it anymore.

Closed Opportunity Codes

We use closed opportunity codes when we are closing our sales cycle, and usually that happens because we have either won the deal or we have lost the deal.

Closed opportunity codes are used to identify why we are closing an opportunity. Is it because we have won or lost a deal?

These codes will help us later to track the success factors of opportunities and we can measure our sales success.

Click Departments/Sales & Marketing/Sales/Setup/Close Opportunity Codes.

You will see a list of potential codes that we can use to close our opportunities and you can make as many as you want.

You have to divide them in either a Lost or a Won type and then you can give reasons, why we have lost or why we have won, for example, won because of a strong presales work, best price, best product, or lost because ineffective presale work or poor customer relations, and so on.
So these codes later on will give you an idea why we have won or lost specific deals.

You can also find here a calculated field with a number of opportunities that we closed because this or another reason.

Create New Opportunity

Open the contact card and click Opportunities on the Navigate tab.

Click Create Opportunity, to open a wizard.

Example: Create a New Opportunity

Use the wizard to create opportunity:

  • We have an opportunity not only to sell Tables but also to sell Chairs to the contact A. Gibson’s Law Firm.
  • Let’s say that the current data (work date) is the date for the opportunity.
  • The priority is normal.

  • Click Next.
  • The contact involved for this opportunity is specified.
  • We can link the salesperson involved with this opportunity, say Annette Hill.
  • Let’s say that this is an existing customer, a small one, so we apply the relevant sales cycle code.

  • Click Next.
  • You could also say that this is linked to a campaign, but in this case, we say it is not.

  • Click Next.
  • We can immediately activate the first stage or we can do it later on. Let’s say we activate it.
  • We need to give it a certain value, say 1000.
  • Specify the percentage of success, say 50%.
  • Specify an estimate closing date, say we need to close this by end of the month.

  • Click Finish.
  • You will notice that we have two opportunities, out of which the new one is about the chairs, that we just created.

Example: Update an Opportunity

  • Now, let us assume that a couple of weeks later, we want to update the opportunity because we have executed new steps in the process.
  • So select the opportunity, and under Actions tab click Update, which will open the Update Opportunity wizard.
  • Click Next.

  • Here we see that we are bringing this opportunity now to the second stage. Depending whether or not you are allowed to skip, you can select other stages if applicable.
  • The date of this change is today for example.

  • Click Next.
  • We might have new information that the value of this opportunity is higher (1,250) and probably our chances of success have increases as well (65%).
  • The estimated closing date can be a little bit later, may be couple of weeks.

  • Click Finish.
  • You will now notice that the opportunity is in the second stage of the sales cycle.

Linking Sales Quotes to Opportunities

In Dynamics NAV, a sales quote can be created completely driven from opportunity itself. So the link between the sales documents and the opportunity is established and guaranteed.

This means that sales quotes for opportunities can directly be created from the opportunity itself. So we can have a sales quote created in the process of updating the opportunity, and that means that we also have at the same time established a link between both.

To be able to create a sales quote for an opportunity:

  • This opportunity must have the in-Progress status and no other sales quote is assigned to it already.
  • In case that you are using contacts that are not synchronized with customers, you also need to have customer template set up.

Example: Update Sales Quote for an Opportunity

Let us check the A. Gibson”s Law Firm contact.

Navigate to the Opportunities.

In this example, we have two opportunities (from previous steps), and Chairs is the most recent one. Let’s say that we want to update this opportunity and bring it to the next stage.

  • Click Update on the Actions tab.

  • Click Next.

  • Now, in this example if we wanted to bring it to a new stage, it will be the third stage, which is dedicated to a proposal.
  • Click Next.

In this case, Dynamics NAV will warn us, saying that we need to assign a sales quote. This is because of the configuration that we have done on the sales cycle level, here we have made a quote necessary for this stage.

So what can we do? well, from the opportunity window itself, we can assign a sales quote, by clicking Assign Sales Quote action.

  • You will see that we get a sales quote with a certain number for this contact, A. Gibson’s Law Firm.
  • You also see that in this sales quote, you have a field which is called opportunity, which is automatically filled up with the opportunity number because we started this process from the opportunity window.

So now if we close the sales quote, we will be able to update a bring our opportunity to the next stage.

  • Let’s say our chances of success are a little better (75%)
  • Maybe the amount has also changed after making the sale quote (1,750.00/-)
  • Click Finish.

Now you see that the update to the third stage was successful.

At any time, we can always ask and check the quote which is in the system and is related to this opportunity, by clicking on Show Sales Quote action.

Note: You can assign opportunity to sales quote manually, by going to the sales quote, however, you need to make sure that the opportunity is not already assigned to any other sales quote.

Opportunities Overview

Click Departments/Sales & Marketing/Marketing/Opportunities.

Here you can have an overview of all the opportunities in the system, instead of accessing opportunities from individual contacts.

You can select one of the opportunities and then start working with the same views & actions that you have available as if you would start from an individual opportunity.

Close Opportunities

When the negotiations are over, opportunities can be closed. While closing an opportunity, you need to specify the reason for closing it and to be able to specify this reason, you must first of course set up the closed opportunity codes.

You can also delete closed opportunities, for example, after you have concluded a deal or when the opportunity list window is overloaded with closed opportunities.

So, basically, we have two actions:

  • Action: Close Opportunity
  • Batch Job: Delete Closed Opportunities

Example: Close Opportunity

Open the contact A. Gibson”s Law Firm and Navigate to the Opportunities.

On the Opportunity List, select the opportunity (Chairs in this case), and click Close under Actions tab.

This will open a wizard, where you can specify why you want to close the opportunity? Let’s say we Lost.

Click Next.

Now specify the reason for closing the opportunity. Let’s say we have done ineffective presales (Choose PRES_L code from the list).

You have the option to cancel any of the existing open to-dos that might still exist.

Click Finish.

Note that the opportunity is now closed and the status is Lost.

If you now go to the overview of all opportunities, you will see the closed opportunity here as well. You can sort and filter on this.

Also, when you open the opportunity card, you can see all the details, such as:

  • The last action that was carried out.
  • The opportunity is closed.
  • The opportunity is Lost.
  • Percentage complete is now 100%.
  • Calculated Current Value has become Zero.
  • etc.

Delete Opportunities

In your organization, opportunities will be closed all the time, which means that at a certain point in time you will have a lot of closed opportunities in your overview, and it is possible to think that you want to get rid of these closed opportunities.

So you need to do some data deletion or data clean-up. In Dynamics NAV you have a Delete Closed Opportunities batch job for this purpose.

Click Departments/Administration/IT Administration/Data Deletion/Marketing Activities/Delete Closed Opportunities (or search for Delete Closed Opportunities and select the relevant link).

You can bring in a number of filtering, for example you might not want to close all opportunities, but maybe opportunities from a certain date range, etc.

When you click Ok, the opportunity will be deleted.

Opportunity Statistics

You can view opportunity statistics from various places in Dynamics NAV:

Contact Statistics

On the Contacts list, select the contact and click Statistics.

Salesperson Statistics

On the Salespeople/Purchasers list, select the Salesperson and click Statistics.

Campaign Statistics

On the Campaigns list, select the campaign and click Statistics.

Sales Cycle Statistics

On the Sales Cycles list, select the sales cycle and click Statistics to view opportunity related statistics.

Sales Cycle Stage Statistics

On the Sales Cycle Stages, select a stage and click Statistics to view opportunity related statistics.


Segments are subset of contacts, based on certain criteria. In Microsoft Dynamics NAV we can make subgroups of targeted contacts by making use of the Segmentation functionality. But before we can create such segmentation, we need to check if we have sufficient information and parameters to base our segmentation on!

So, the question is what information can we use to make segments? Well, the good news is that in Dynamics NAV you can use nearly all the contact information to make your segments and some information holders are specifically designed to fulfil this function.

Contact – Segmentation Fast Tab

On the Segmentation fast tab of a Contact we can see:

  • Typical criteria that we us for segmentation of our company:
    • No. of Mailing Groups
    • No. of Business Relations
    • No. Industry Groups
  • Typical criteria specific to contact of type person:
    • No. of Job Responsibilities
    • Organisational Level Code
  • Exclude from Segment should be selected when you do not want the contact to be part of any segment.

Segment Criteria

Click Departments/Sales & Marketing/Marketing/Segments (or search for Segments and select the relevant link).

Let us check out an existing Segment “Increase Sale”. You will see that a number of contacts are part of this subset. Click Criteria to check the segment criteria.

Here you can see for instance, the Contact Business Relation is filtered on CUST and the list is further refined/reduced by adding another criterion.

Create Segments

Example 1

  • On the Segments page, click New to create a new segment.
  • Tab out of No. field to generate a new segment number automatically.
  • Enter a description, say “Learning Centers”.
  • Now, we can add contacts manually, however, that may take a lot of time. A faster way would be to use the Add Contacts batch job.
  • We would like to add contacts who have a specific Business Relation Code, say “Learning Center”. On the Add Contacts batch job, go to Contact Business Relation fast tab and specify the Business Relation Code, say “LC”. Click OK.

  • You will notice that one contact is added in the Lines. Why? because this is the only contact with Business Relation Code as “LC”.

Example 2

  • Create a new segment for “Marketing Responsible People”.
  • Click Add Contacts. This time go to Contact Job Responsibility fast tab and specify Job Responsibility Code as “MARKETING”.

  • Click OK. All the contacts with specific job responsibility are added.

Example 3

  • You can also combine criteria.
  • Let us say we would like to create a subset of contacts with country code as Canadian.
  • Create a New Segment named “Canada Customers”.
  • Click Add Contacts and specify the following criteria:
    • On the Contact Business Relation fast tab, specify Business Relation Code = CUST
    • On the Contact fast tab, specify Country/Region Code = CA

  • Click OK. Only those contacts are listed that align to this combination of criteria.

Removing Contacts

Once you have created a sub set of contacts, you may also want to remove certain contacts or refine the list of contacts. You can do this is the following ways:

  • Manually by removing from segment lines.
  • Automatically:
    • Refine Contacts by specifying which contacts to keep.
    • Reduce Contacts by specifying which contacts to remove.


Select the line that you want to remove, right-click on it and select Delete Line (Ctrl+Del).

Click Ok, on the confirmation dialog that appears:

Refine Contacts

With this function, you can specify which contacts you want to keep.

Let us open a Segment, which is based on a criterion where the Business Relation Code is “PRESS”.

We would like to further refine the contacts, by including Country Code, say “GB”. On the Segment card, click Contacts, Refine Contacts.

Specify the required filter and click OK.

The list is further refined as per the criteria.

Reduce Contacts

Let us say that we have a segment which contains a subset of contacts where the Business Relation Code is “CUST” (Customers), but what we initially wanted was that we only have those contacts who have salesperson code as “JR” (John Roberts).

As you can see, we have 84 contacts here with various sales person:

Click Contacts, Reduce Contacts.

Specify the relevant filter and click OK.

The result is that all those contacts who do not have the Sales Person Code as “JR” are removed, therefore giving us a reduced segment.

Reuse Segmentation Criteria

To speed up the process of creating Segments in Dynamics NAV, you can make use of the functions such as Save Criteria, Reuse Criteria and Reuse Segment.

Save Segmentation Criteria

To save an existing Segment Criteria, open the Segment Card and click Segment, Save Criteria.

Specify a Code and a Description to save the segment criteria.

Reuse Criteria

Create a New Segment and provide a Description.

Click Segment, Reuse Segment.

Select an existing saved criteria and click OK.

This will generate the segment based on the selected criteria.

Reuse Logged Segments

We can reuse logged segments as well. We usually log segments, when we are finished with the actions and we want to keep historical data for the segments.

Create a New segment.

Click Segment, Reuse Segment.

Select a logged segment and click OK.

This will generate the segment based on the selected logged segment.

Relationship Management Overview

What is Relationship Management?

  • Is it the same as CRM? Or
  • Is it the same as Customer Relationship Management?

So, it is an important to first position what is Relationship Management in NAV.

Relationship Management in NAV is more than just relations with customers:

  • You can track companies and persons, but they do not necessarily need to be customers already.
  • You can track process that precedes the activities of customers.
  • You can track information about vendors as well. So it is not only about customers but also about prospects and vendors.

Relationship Management is integrated in the ERP environment, and that has a number of benefits:

  • First of all, you have fast access to:
    • Invoice information
    • Payments
    • Reminders and
    • Much more transactional information which is of course embedded in our ERP.

    So the big advantage is that you do not have to write any integration at all to have access to all that information.

Key Aspects in Relationship Management

So, you will work with NAV Contacts and these contacts will be the base entity for the Relationship module:


Contacts can be companies or they might be person. Relationship Management gives us the opportunity to enter a Contact Type and that type can be Person or Company. Of course, this is relevant because for persons you want to record other information than you do for companies.

Segmentation, Profiling and Classification

In Relationship Management Segmentation, Profiling and Classification is very important, because later on you would like to communication with your contacts, however not all the contacts, maybe a sub section, for example you would like to filter on person with certain language, person with certain interest, and so on.

These activities are very important in Relationship Management, Marketing and Communication Management.

Interactions and Document Management

In NAV it is also possible to record Interactions. It might be things like E-Mails or Documents (quotes, invoices, reminders, etc.). So in Relationship Management you will be able to record all the interactions with your prospects, customers and vendors.


Another important feature in Relationship Management is to track and follow up on Opportunities. It is important because opportunities will fill your sales pipeline, later on you will be able to make orders and will be able to invoice.

You can track entire opportunity process in Relationship Management. As a consequence of opportunities, later on NAV Contacts will be transferred into Customers. You can also record all these transactions and interactions for vendors.

Native Integration with Microsoft Dynamics CRM

Last but not the least, you have a native integration between the Relationship Management module of NAV and Microsoft Dynamics CRM.

The Contacts in NAV is related to Accounts & Contacts in CRM.

NAV CRM vs Microsoft Dynamics CRM

The following table compares NAV CRM and Microsoft Dynamics CRM:

NAV Relationship Management Microsoft CRM
Customer and Vendor Contact Management Accounts, Contacts and Leads
Marketing Campaigns Marketing Campaigns / Many Third Party Options
Limited Outlook Integration Outlook Client
Dashboards Limited to Role Centres Robust Dashboard Functionality
Inside NAV, No Integration Required Integration Required, Effort varies with NAV Version