Category Archives: Dynamics 365

Create auto number field

Creating a auto number field has always been part of a project somewhere along the line and now we can create them using Dynamics 365 SDK without having to write custom plugins.

At the time of writing the post we can only create auto number fields using the SDK and not from the UI but i am positive we will see the feature in the UI in the near future.

Currently supported tokens

  • Static String
  • DATETIME:[format] e.g: yyyyMMddhhmmss
  • SEQNUM:size


The following examples show how to create a new auto-number attribute named new_SerialNumber for a custom entity named new_Widget which will have a value that looks like this: WID-00001-AB7LSFG-20170913070240. Using the Organization service with SDK assemblies CreateAttributeRequest and StringAttributeMetadata classes:


Microsoft Docs used click here


Exporting\Importing Voice of the Customer Surveys

Voice of the Customer for Dynamics 365 is a great enhancement to the Dynamics 365 product, giving you the ability to distribute surveys and store survey responses with in Dynamics 365.

Working in a enterprise environment you will most probably be asked to move your surveys from your QA environment to your Production environment and this is where it gets tricky. In the below steps i explain how i migrated our surveys from one environment to another.

Step 1: Confirm that you have the latest version of VOC installed on your Dynamics 365 instance.

Step 2: Navigate to the Survey that you want to export, and confirm that the survey is published.

Step 3: Navigate to the notes section of your survey and download the Survey *.xml file

Step 4: Open the *.xml file using notepad and copy the content to the clipboard.

Step 5: Navigate to your destination environment where you want to import the survey. Go to Settings -> VOC Settings -> VOC Imports -> Click New – Give the Import a descriptive name and past the *.xml file content into the “Survey Xml to Import” section and Click “Save”

Step 6:  Open the newly imported survey and delete the exciting notes, close the survey and open it again to confirm the notes have been deleted.

Step 7: Publish and Test your imported survey.


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

Microsoft Dynamics 365 (online and on-premises) Update 2.1

Microsoft Dynamics 365 (online) Update 2.1 update is now in progress for Dynamics 365.

This article describes the updates and changes that are included in this update.

This update is available for all languages that are supported by Microsoft Dynamics 365.

Microsoft Dynamics 365 (online and on-premises) Update 2.1 resolves the following issues:

  • “Scheduling Alerts” dialog is displayed without any alerts in non-Internet Explorer browsers.
  •  Activities and Closed Activities Icons not displayed correctly for some entities.
  • AdminOnlyMode check should be bypassed when an application from outside wants to execute a SDK in system user context.
  • Appointment recipients do not receive invitations.
  • Appointments created in Outlook, or the Outlook Web App need to be activated.
  • Audit details lost after switching Case Status transition.
  • Cannot add associated record for N:N Relationships with only Append/Append To permissions.
  • Categorized Search fails with Query Builder Error due to use of lookup entity Attributes in Quick Find view.
  • When a Business Process Flow in the Case Entity is duplicated access to Incident records is broken.
  • Changing owner via workflow also changes Owner in Create Audit Event.
  • Clicking Phone Number link opens Quick Create form.
  • Command Bar in activities tab in social pane not displaying all buttons.
  • Navigating from Contact to Opportunity, and back again hangs with the message “Requesting Data from CRM”.
  • Creating an Appointment from the Social Pane when < symbol is present (Opportunities).
  • Customized Workflow activity will be triggered twice which is designed to be called only once.
  • Deactivate screen with custom Inactive status reasons requires scrolling to choose the option.
  • Editing columns during Advanced Find throws the error (
  • Email body is disabled while using Chrome in Citrix, and Chrome Incognito mode in Windows.
  • Export solution failed in RoutingRuleHandler.ExportWorkflow with Null System.NullReferenceException: Object reference not set to an instance of an object.
  • Export to Dynamic Worksheet doesn’t respect regional settings.
  • Forms no longer underline section headings since Dynamics 365 upgrade.
  • Getting SQL timeout exception when retrieving application metadata.
  • Open in browser generates invalid URL in iOS 10.
  • Last updated field is not shown up under Health box.
  • Lookup is not defaulting.
  • Missing “+” Icon on the Quick View control.
  • Unable to Set Regarding on e-mails when using the Unified Service Desk.
  • The error “Object doesn’t support property or method ‘$find'” occurs when clicking on Results button twice.
  • Organizations upgraded from Microsoft Dynamics CRM 2016 can have a Null BusinessProcessType causing these Business Process Flows to be unusable post upgrade.
  • A Lookup control error occurs when updating appointment created in Outlook.
  • Page keeps loading after clicking Ok on access denied error.
  • Previous connection to mailbox is not closed properly using Hybrid Email Server Profile.
  • The error “unable to connect to Exchange” occurs when attempting to use the CRM App for Outlook in Outlook Web App (OWA).
  • Scheduling Alert occurs without an alert when changing an existing Appointment.
  • Server Side Synchronization required attendees list changes when multiple contacts exist with same email address, or users exist with same email address as contacts.
  • Solution uninstall is not respecting dependency.
  • StatusCode value is displayed as Integer instead of Text for Inactive records on the QuickViewForm.
  • Subgrid for Opportunity doesn’t trigger the Opportunity default Business Process Flow.
  • Subgrid record changes layout of the Form.
  • Sync workflow with System User as primary entity throws error when triggered.
  • SystemUserPrincipals could not repopulate when User is reactivated.
  • Tasks duplicating through Server Side Synchronization after Security Role change.
  • Unable to add Notes to Task After navigating away from Task Form in Dynamics 365 For Sales.
  • Unable to Assign Security Role to Business Process Flow in Dynamics 365 for Sales.
  • Unable to import Excel containing Floating Point Number field data.
  • Unable to populate value on Service field on Service Activity from the Form assistant.
  • Unreadable HTML encode displays in alternate key Selected Attributes list.
  • WebAPI FetchXml query does not return FormattedValues for Link-Entities attributes in Dynamics 365.
  • When hiding the Business Process Flow during onLoad only the first 2 steps are displayed when showing the Business Process Flow.

Microsoft Article

Microsoft Dynamics 365 Developer Toolkit Configuration


“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.


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


  • 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


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


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


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