Category Archives: Microsoft Dynamics CRM

Microsoft Dynamics 365 – Change Tracking Solution

Change Tracking Solution

A feature that provides the ability to track the changes on D365 made by System administrators/customizers
The Change Tracking solution helps in tracking down the details of changes on who updated an entity, JavaScript, assemblies and processes along with the time of update. This solution is built on Dynamics 365 and as well works on Dynamics CRM 2016 (Online/ On premises)

Get It Now

Support Ending for Microsoft Dynamics CRM 4.0

Dynamics CRM 4.0 Support

Microsoft Dynamics 4.0 will reach end of extended support on April 10, 2018. If you are using this version, please upgrade to Microsoft Dynamics CRM 2013 or a later version before April 10, 2018 to ensure supportability.

The best way to continue to get full support for Dynamics CRM is to upgrade to the latest versions, now known as Dynamics 365. Click here for information on the latest Dynamics 365 products.

The following resources are available to help you upgrade:

Microsoft Dynamics 365 IT Pro Technical Library
Upgrade CRM 4.0 Organization to CRM 2011
Upgrading from Microsoft Dynamics CRM 2011 & CRM 2013

Microsoft Dynamics 365 Developer Toolkit Configuration

Introduction

“The Developer Toolkit is a set of Microsoft Visual Studio Integration tools, focused on accelerating the development of custom code for Microsoft Dynamics 365(CRM)

Using the toolkit, you can create, develop and deploy CRM plug-ins, custom workflow assemblies and web resources without leaving the Visual Studio environment.”

It has been a while since the last release of the Dynamics CRM Toolkit. With the new Visual Studio toolkit for Dynamics 365 a lot has changed and with extra configuration that needs to be done before you can start using it.

Installation

There is not much to installing the toolkit. (make sure all instances of Visual Studio is closed)

  • Run the Installation file.
  • Select the target version of Visual Studio where you want to install the toolkit.
  • Click Install.

Download Dynamics 365 Developer Toolkit

Download Dynamics 365 SDK

Configuration

  • Extract the Dynamics 365 SDK to your desired local location.
  • Open Visual Studio
  • Click Tools -> Options
  • Expand Dynamics 365 Developer Toolkit and select Tool Paths
  • Set the Plugin Registration tool & SDK Bin path to where you extracted the SDK

  • Click OK

Create Project

  • On the Visual Studio Startup page click New Project
  • Under Templates select Visual C# -> Dynamics 365 -> New Visual Studio Template for Dynamics 365 
  • Click OK
  • Select you Solution Type to Configure
    • Start from CRM : The Solution is already created in CRM
    • New CRM Solution: Create new CRM Solution for this project
  • For this blog I will select Start from CRM
  • Login using your Dynamics 365 Administrator account
  • Select your CRM solution 
  • Select Add New Templates
    • Add  Plugin Project
    • Add Customization Project
    • Add Custom Operation OR Workflow Activities
  • Click Next
  • Assign project names to each selected Template
  • Click Done
  • Your Visual Studio solution is now ready for you to start your development.

Dynamics 365 Site Map Editor

Introduction

I have been working with Dynamics CRM since version 4.0 and in the past any change that you needed to do on the Sitemap was a pain. Later we at least had awesome tools like Visual Ribbon Editor & XrmToolbox to make life a lot easier. With Dynamics 365 Microsoft has released a build in editor for us and i explain the basics in the following steps.

Editing the Default site map

  • Navigate to Settings > Solutions
  • Create a new solution called Sitemap and add the Sitemap to your solution.

Note that each App in Dynamics 365 will have its own site map

  • Double click on the sitemap you selected, this will open the Dynamics 365 Sitemap Editor 
  • The designer is very easy to use, everything is drag and drop. When creating a new sub-area you have the ability to create on of the following types.
    • Dashboard
    • Entity
    • Web Resource
    • URL
  • You can add Localized Labels for you components
  • Set the Icon, Privileges
  • Set the targeted client & SKU
  • Click Save & Publish

Dynamics CRM Calculation & Rollup Fields

Introduction

After completing my blog on Dynamics CRM Calculation Fields I was asked by JJ Scholtz, friend and fellow Dynamics Enthusiast to write on Calculation fields vs Rollup Fields.

Calculated Fields

Calculated fields are virtual fields meaning that the actual result of the calculation does not get saved in the database column, but it is still available on all the Forms, Views and even when selecting data from the SQL views using TSQL. If you navigate to your Dynamics database and view the calculate field that you created you will see that the field type is ComputedA computed field has a expression that can perform calculations using other columns in the same table. The expression can use noncomputed columns, constant, function or a combination.

If you view the properties of your computed column in SQL you will see in the Computed text property contains the name of a function created by Dynamics with a SQL version of the formula defined in CRM when the calculated field was created.

 

Things to keep in mind when using calculated fields:

  • Updates to these fields won’t trigger workflow updates
  • Fields are only available for retrieve in plugins and are not available as part of create or update plugin context
  • Fields are virtual and not stored at the database level
  • You cannot mix and/or statements.  Can only use all OR’s or all AND’s
  • Can only go up on level to access data on N:1 relationships

Rollup Fields

Rollup fields are actually saved in the database and are not virtual fields like we have seen with the calculated fields. Rollup up fields are meant to be aggregate calculations of child entities. For example Total value of all line items on quote or invoice.

The UI for creating a rollup field is almost the same as for calculated fields except on rollup fields we have a section for Related Entities used to rollup values on child records.

Rollup fields are stored in the RollupPropertiesBase table in SQL. OOB an Async job gets executed every hour to recalculate the rollup field. Users can also force the recalculation process if the rollup field exist on the form.When users hover over the field they will see a refresh icon.

Things to keep in mind when using rollup fields:

  • Roolup field calculation does not get preformed in real time
  • Value is stored in the database as a actual field
  • Recalculating a rollup field will not trigger the update plugin context.

Dynamics 365: Feedback Entity

Introduction

Enabling feedback on you entity gives customers the ability to write feedback or rate the entity record. In a sales scenario you can enable the Product entity to get feedback from users regarding your products,

Enable Feedback on Entity

  • Go to Settings > Customizations > Customize the System.
  • Under the Components > Entities select the entity that you want enabled feedback on.
  • Under Communication & Collaboration, select the Feedback check box.
  • Publish all your customizations

If you enable a entity for feedback it cant be disabled at a later stage.

Add Feedback sub-grid to entity

  • Go to Settings > Customizations > Customize the System.
  • Under the Components > Entities select the entity that you enabled Feedback on in the above step.
  • Open the entity Form where you want to display the Feedback sub-grid
  • Select your Section > click Insert > Sub-Grid
  • Fill in the Name and Label for your Sub-Grid
  • Records: Only Related Records
  • Entity: Feedback (Regarding)
  • Default View: Active feedback
  • Click OK
  • Save & Publish Form

Following Data is save on the Feedback entity

  • Feedback title
  • Feedback comments
  • Feedback rating. You can also define a range for ratings by specifying a minimum and maximum (numerical) value for ratings. For example, a rating of 4 on the scale of 1-5.
  • Normalized rating for feedback that is automatically calculated to show the specified user rating scaled to a value between 0 and 1 based on the minimum and maximum rating values.
    The normalized rating is calculated as follows: (Rating – Minimum Rating) / (Maximum Rating – Minimum Rating).
  • Feedback status such as Open or Closed
  • Feedback source to display the source from where the feedback was submitted. If the feedback was created from within Dynamics 365, the value is set to Internal. Developers can add a value of their choice depending on the application used to provide feedback.
  • User who created or last modified the feedback record
  • Entity record that the feedback is associated with

 

Dynamics CRM Calculation Fields

While working on business requirements, most of the time we need to calculate values using different attributes and need to store the result in a different field. In the past you would have needed to write custom JavaScript or a Plugin to apply any calculations to fields. Since  CRM 2015 Microsoft has given CRM Administrators the ability to create calculated and roll up fields for calculations.

Lets create a new custom entity with the following two fields

  • Price (Currency Field)
  • Quantity (Number Field)
  • Tax (Currency Field)

Next we need to create the calculated field

Click Edit to configure the field calculation

  • Create condition to execute calculation when Price field contains a value grater than zero.
  • Create action (dd_price * dd_quantity + dd_tax) to perform when the above condition is met. 
  • Save & Close the calculated field then Publish All Customizations
  • Open the form and capture a value for Price, Quantity & Tax 
  • Click Save
  • The total field will contain the calculated value

 

 

Server-to-Server (S2S) Authentication with Dynamics 365 – Part 2

Introduction

In Part 2 we will enhance your previously created MVC web application to connect to Microsoft Dynamics 365 and execute basic commands using the Microsoft Dynamics 365 SDK.

Requirements

Web.config

  • Add the following to the appSettings section

Login to Azure AD navigate to App &gtegis<rations select the application you created in Part 1 of this blog. then navigate to Keys.

Copy the newly generated code and past it into the ida:ClientSecret value in your web.config file.

Set Home Controller access as anonymous

  • Navigate to \Controllers\HomeController.cs
  •  Adding the  [AllowAnonymous]  keyword above your action will give the use the ability to access the page anonymously without Authentication.

Create Contact List link 

  • Navigate to ../Views/Shared/_Layout.cshtml and add the following code to display the WhoAmI link on our web application.

We will only display this link if the user has logged in and has been authenticated.

Create CrmController

  • Right click the Controllers folder and select Add > Controller
  • Select MVC 5 Controller – Empty
  • Click Add
  • Add the following properties to the CrmController

  • Create a new method called GetServiceUrl in the CrmController. This method takes the CRM Organisation name and returns the CRM organisations service URL.

  • Add the following code to your Index method

If If you get a error “AuthenticationContext does not contain AcquireToken” make sure that you have added version 2.xx.x of the Microsoft.IdentityModel.Clients.ActiveDirectory assembly reference to your project

Create Crm View

  • Right click the Crm folder and select Add > View…
  • In the Add View dialog, set the following values:

  • Click Add
  • Update your view to represent the following code.

  • Press F5 and test you application.

Source Code

Server-to-Server (S2S) Authentication with Dynamics 365 – Part 1

Introduction

With server-to-server (S2S) authentication, external services like web applications can seamlessly and securely connect to Dynamics 365 in a controllable manner. Typical scenarios for this service are third-party applications and internal customer applications that need to integrate with Dynamics 365 data.

Requirements

  • Visual Studio 2015 with web developer tools installed
  • A December 2016 update for Microsoft Dynamics 365 (online) tenant associated with your Azure Active Directory (Azure AD) tenant.

Create an MVC web application

Using Visual Studio 2015, create a new MVC web application and register it with your Azure AD tenant.

  • Open Visual Studio 2015, Click New Project and select .NET Framework 4.6.1 and the ASP.NET Web Application template.
    Click OK, and in the New ASP.NET project dialog select MVC.
  • Click the Change Authentication button and select Work and School Accounts. s2sauth_01
  • Select Cloud – Multiple Organizations and click OK

    if you get the following error “Error: The user account ‘user@domain.onmicrosoft.com’ doesn’t have the required permissions to access the domain ‘domain.onmicrosoft.com’.” make sure your visual studio is singed in with the same credentials you are trying to use to connect to Azure AD.

  •  if you navigate to https://portal.azure.com under App Registrations you will see the app created by Visual Studio.
  • You will need to give you app access to your Dynamics 365 data.
    • Under API Access area click Required permissions
    • Click Add -> select API -> Dynamics CRM Online and click select
    • Click Done to save permission changes
  • Run your MVC application and you will be prompted to login using your Online credentials.

Dynamics Build Numbers

Dynamics 365 (CRM 2016) Build Numbers

Build Number KB Release Date Description
8.0.0.1088 2015 December CRM 2016 RTM
8.0.1.79 KB3133963 2016 February 26 CRM 2016 Update 0.1
8.1.0.359 KB3154952 2016 May 23 CRM 2016 Service Pack 1
8.1.0.371 KB3154952 2016 September 21 CRM 2016 Service Pack 1 (Outlook Client only)
8.2.0.749 KB3205084 2016 December 16 December 2016 update for Dynamics 365

CRM 2015 (on-premises) Build Numbers

Build Number KB Release Date Description
7.0.0.3543 2014 November 17 RTM
7.0.1.129 KB3010990 2015 April 13 CRM 2015 Update 0.1
7.1.0.1074 KB3056327 2015 May CRM 2015 Update 1.0 (Client & router only)
7.1.1.3113 KB3072333 2015 August CRM 2015 Update 1.1 (Client & router only)
7.0.2.53 KB3010990 2015 November CRM 2015 Update 0.2
7.1.2.1032 KB3141809 2016 July 18 CRM 2015 Update 1.2 (Client & router only)

CRM 2013 Build Numbers

Build Number KB Release Date Description
6.0.0000.0514 RC
6.0.0000.0809 RTM
6.0.0001.0061 KB2891271 2013 December 16 Update Rollup 1
6.0.0002.0046 KB2919956 2014 March 22 Update Rollup 2
6.0.0003.0106 KB2930480 2014 July 15 Update Rollup 3
6.1.0000.0581 KB2941390 2014 May 28 Service Pack 1
6.1.1.132 KB2953252 2014 September 23 CRM 2013 Service Pack 1 Update Rollup 1
6.1.2.112 KB2963850 2015 February 6 CRM 2013 Service Pack 1 Update Rollup 2
6.1.3.119 KB3016464 2015 April 15 CRM 2013 Service Pack 1 Update Rollup 3
6.1.4.145 KB3122951 2016 February 22 CRM 2013 Service Pack 1 Update Rollup 4

CRM 2011 Build Numbers

Build Number KB Release Date Description
5.0.9688.53 2011 January 30 RC
5.0.9688.583 2011 February 22 RTM
5.0.9688.1045 KB2466084 2011 April 04 Update Rollup 1
5.0.9688.1155 KB2466086 2011 June 02 Update Rollup 2
5.0.9688.1244 KB2547347 2011 July 28 Update Rollup 3
5.0.9688.1450 KB2556167 2011 September 22 Update Rollup 4
5.0.9688.1533 KB2567454 2011 November 08 Update Rollup 5
5.0.9690.1992 KB2600640 2012 January 12 Update Rollup 6
5.0.9690.2165 KB2600643 2012 March 22 Update Rollup 7
5.0.9690.2243 KB2600644 2012 May 3 Update Rollup 8
Cancelled Update Rollup 9
5.0. 9690.2730 KB2710577 2012 August 16 Update Rollup 10
5.0.9690.2835 KB2739504 2012 October 11 Update Rollup 11
5.0.9690.2838 (Client)
5.0.9690.2839 (Server)
KB2739504 2012 October 11 Update Rollup 11 v2
5.0.9690.2903 KB2855319 2013 July 26 Critical Update for
Update Rollup 11
5.0.9690.3233 (Client)
5.0.9690.3236 (Server)
KB2795627 2013 January 29 Update Rollup 12
5.0.9690.3448 KB2791312 2013 March 26 Update Rollup 13
5.0.9690.3557 KB2849744 2013 July 11 Update Rollup 14
5.0.9690.3731
5.0.9690.3739
(Outlook client only)
KB2843571 2013 October 7 Update Rollup 15
5.0.9690.3911 KB2872369 2014 January 22 Update Rollup 16
5.0.9690.4150 KB2915687 2014 May 8 Update Rollup 17
5.0.9690.4376 KB2958724 2014 September 24 Update Rollup 18
5.0.9690.4439 KB3179593 2016 October 19 Update for CRM 2011 (KB3179593)

CRM 4.0 Build Numbers

Build Number KB Release Date Description
4.0.7333.3 2007 December 19 RTM
4.0.7333.1113 KB952858 2008 November 24 Update Rollup 1
4.0.7333.1312 or
4.0.7333.1316
KB959419 2009 January 15
2009 February 8
Update Rollup 2
4.0.7333.1408 KB961768 2009 March 12 Update Rollup 3
4.0.7333.1551 KB968176 2009 May 7 Update Rollup 4
4.0.7333.1644 or
4.0.7333.1645
KB970141 2009 July 2 Update Rollup 5
4.0.7333.1750 KB970148 2009 August 26 Update Rollup 6
4.0.7333.2138 KB971782 2009 November 5 Update Rollup 7
4.0.7333.2542 KB975995 2009 December 17 Update Rollup 8
4.0.7333.2644 KB977650 2010 February 11 Update Rollup 9
5.0. 9690.2730 KB979347 2010 April 8 Update Rollup 10
4.0.7333.2861 or
4.0.7333.2862
KB981328 2010 June 3 Update Rollup 11
4.0.7333.2935 KB2028381 2010 July 29 Update Rollup 12
4.0.7333.3018 KB2267499 2010 September 23 Update Rollup 13
4.0.7333.3135 KB2389019 2010 November 18 Update Rollup 14
4.0.7333.3231 KB2449283 2011 January 13 Update Rollup 15
4.0.7333.3335 KB2477743 2011 March 10 Update Rollup 16
4.0.7333.3414 KB2477746 2011 May 5 Update Rollup 17
4.0.7333.3531 KB2477777 2011 June 30 Update Rollup 18
4.0.7333.3628 KB2550097 2011 August 25 Update Rollup 19
4.0.7333.3732 KB2550098 2011 November 10 Update Rollup 20
4.0.7333.3822 KB2621054 2012 February 9 Update Rollup 21