Solution Segmentation in CRM 2016: Add selected entity assets to solution

With the launch of Microsoft Dynamics CRM 2016, out of many important features added one is Solution Segmentation and Patches.

With solution segmentation we can now export solutions with selected entity assets (fields, forms, views, etc.) rather than entire entities with all the assets.

This helps a lot as previously if we were required to deploy a single new view created for an entity, we were required to deploy and publish the complete entity. This used to end up deploying some under development depended components too. The feature is most importantly useful in applying patches.

This feature allows granular control of the solution package without changing any XML. This will make ALM and Deployments much smoother.

Also by making use of the API aspect, we can try to automate build and deployment process.

Supported entity assets that can be selected for a entity are:

  1. Forms
  3. Charts
  4. Fields
  5. Keys
  6. Relationships (1:N, N:1, N:N)
  7. Messages
  8. Business Rules
  9. Hierarchy Settings
  10. Dashboards

Follow TechNet articles for more information on Use segmented solutions and patches to simplify solution updates

Display Only Date value from Date field in Dynamic CRM Global Email Template

Amiz crm

One of my requirement is to display the date value form date field for my email template. But in CRM 2015, the date value shows with time, eventhough the selected date field as date only format. As Is CRM functionality I tried the below steps.

Create new email template and added my date field in that template using Insert/Update button.

Template date 1

Once I ran that template, I got the following output.

Template date 2

But I need the output as date only (like 1/25/2016).

I open the email template and enter the following text ‘{!lead:estimatedclosedate/@date;}’ and save the template.

Template date 3

Now I ran the template the Output was came with my exception.

Template date 4

I hope this will helps you 🙂

View original post

Migrating data to a live on-premises CRM system?

While working on one of the project, we were required to move data from legacy system into a live production system with limited amount of black out window. One can calculate the time required based on number of records, server configuration, etc. and can even have a buffer. But you never know when Murphy will play his role.

Below are few points that, if considered can help Murphy stick to its seat and don’t show up. (Just some pre-checks that helps the processJ)

  • Confirm disk space on SQL, web and application server. Have some buffer space as logs will grow.
  • As your target system is a live production system, surly there will be some scheduled maintenance jobs running to maintain server health as part of disaster management. These jobs are life savers but problem with them is that these are scheduled in down time as they consume high resources. And unfortunately this is the only time when we can perform our import. Thus you may have to consider pausing the maintenance jobs. But do remember to turn them on once done with the import. Some of the resource consuming jobs are: consistency check, database backup, async-operation cleanup, POA, etc. Pausing this job helps the import utilize maximum available server resources.
  • Check the database log size and clear. The log will grow with the import and if it reaches the maximum available threshold the import processes throws timeout errors. Also check the shrink process, preferred if simple.
  • Check for CPU and Memory usage on SQL, web and application server.
  • Check for any blockage on SQL server, if any script is blocking or slow running queries.
  • Clear AsyncOperationBase table.
  • You may run into scenario where it is required to restart the SQL service. Make sure that this do not affect any other process. Also in case of NLB, upon restarting the SQL service switches the active node. Thus you will also have to consider that node for performance check.
  • You may have to disable the user logging and turn off the workflows and plugins.

And last but not the least is FULL database backup before start of the process. Also you make to do this in several passes due to amount of data and limited amount of down time. Identity the steps that can be performed outside black out that do not affect live system. This provides some extra time for completing the critical steps.

I would recommend to do the import in multiple small passes which helps in keeping the buffer and reduces the chances of breaking things or running on edges. After all “Rome was not built in a day”.

These are some of the steps that helped me. As always, these may not match exactly to your requirement but some of them will surly. And I don’t guaranty of anything from the steps as risk will be yours as it’s your production system.

If you have anything to add, please write in comment and I will update the content. Thanks!

Fix: Microsoft.Crm.CrmException: Cannot create the given type without the required parameters.


If you use CRM workflows to create and send notification emails you may come across this error, usually after just having changed the workflow definition in some way:

Microsoft.Crm.CrmException: Cannot create the given type without the required parameters

The full ungodly error message will be something like:

Plugin Trace:
[Microsoft.Crm.Workflow: Microsoft.Crm.Workflow.Activities.EvaluateExpression][EvaluateExpression]
Error Message:
Unhandled Exception: Microsoft.Crm.CrmException: Cannot create the given type without the required parameters.
at Microsoft.Crm.Workflow.Services.ExpressionServiceBase.CreateCrmType(WorkflowPropertyType type, Object[] values)
at Microsoft.Crm.Workflow.Services.ExpressionServiceBase.EvaluateExpression(ExpressionOperator expressionOperator, Object[] parameters, Type targetType)
at Microsoft.Crm.Workflow.Activities.EvaluateExpression.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

When does it happen?

This message has been driving me crazy. Complex workflows that were working perfectly well one minute break after making insignificant changes. At work we have so many workflows sending notifications that even the thought of changing some of them can bring me out in a cold sweat. This is because the only…

View original post 318 more words

Getting error as “Unable to load plug-in type” on updating plug-in in Dynamics CRM


Recently, I have come across with an error message “Unable to load plug-in type” while updating the plug-in. below are the details on this issue:

Issue Background:
I have added a new Plug-in class to an existing plug-in assembly and added some steps to it in DEV environment.
While importing solution into SIT environment with updated Plug-in assembly, class and steps, received the error message.

Error Message:
Unable to load plug-in type

CRM solution import process check the plug-in assembly and classes for the register steps in existing assembly in CRM instead of updated plug-in assembly in solution that we are importing. Hence, we are receiving the error because these newly registered steps are related newly added plug-in class and that is not existed in CRM already.
CRM Solution Import routine checks for the plugin class/type definition in the existing plugin assembly in the server rather than the new…

View original post 46 more words

DID YOU KNOW? Potential issues with CRM due to SQL server replication

I’m not an expert in SQL Server and related stuff like replication but recently faced an issue with simple solution deployment in CRM 2011.


I was trying to deploy an unmanaged solution consisting of Contact entity where I had created a new custom field. When I tried to import the solution, the solution import used to fail without any specific error even in the downloaded log. All components used to process successfully with only Root Components status as unprocessed where the import used to fail.

Then I tried to create the field manually by customizing the entity. When I tried to create a new field, I used to get SQL Server error. The log here too had not much helpful information.


These error messages occurs when SQL Replication is enabled for Microsoft Dynamics CRM databases and you attempt to insert into a text, ntext, or image column that is published in a replication article.

In this case, you get below error.

System.Data.SqlClient.SqlException (0x80131904): Length of LOB data (14349284) to be replicated exceeds configured maximum 65536.


Below article describes the resolution for it.

‘max text repl size’, 14349284



In few cases, above resolution didn’t worked for me. The only way that we could figure of was to import the solution by un-publishing the related replication articles and then publishing.

{QUICK TIP} 4 Reasons to have realistic data for your Dynamics CRM projects!


This post has taken a long time coming. Over time, I have been trying to put down the top benefits that Correct data

provides in any implementation not just specifically CRM. Since CRM is all around Customer or some business data,

it becomes even more relevant to have realistic data for Dynamics CRM development and test environments.


Here are the top 4 reasons why:


Many Dynamics CRM implementations allow high level of flexibility in the way their basic functionality can be used.

Configuration data can dictate control flow, data manipulation, presentation and user interface.

CRM can be configured to fit several business process flows, have role based views, and work (almost) seamlessly

with a variety of tailored experiences to a host of different users.

While business looks to CRM’s configurability to allow them to keep up with the market without being slowed by

View original post 323 more words

DID YOU KNOW? Update of “Middle Name” attributes also updates “Full Name” and “Yomi Full Name”


Recently customer came up with a query that CRM performs multiple updates and all these updates are logged inside audit history.

Here is what was happening.

  • CRM user updates “Middle Name” field.
  • On checking audit history, we have three entries for “Full Name”, “Middle Name” and “Yomi Full Name”.

We didn’t had any plugin or customization done here. After verifying on vanilla CRM online environment we found that these extra updates are performed by CRM internal engine/plugin.

Now comes the question, if we cannot customize “Full Name” field to show middle name in it then why we need an update like this?

What is “Yomi Name”?

Yomi Name is an out-of-the-box field that has the same functionality of First and Last Name for a contact. However, it allows for the user to indicate the phonetic annunciation of the name as described in the description of the field:

“Type the phonetic spelling of the contact’s first name, if the name is specified in Japanese, to make sure the name is pronounced correctly in phone calls with the contact.”