Recently I was tasked with the task of creating an automatic extraction and importing solution using PowerShell Scripts. To do this I created two files one for export and extracting with the other in charge of pack and importing the solution. I was using the Visual Studio template of CRM Package that comes with the sdk.
Export and Extracting The Solution
First thing I did was implement the export and extraction of the CRM solution. The PowerShell script first exports the solution from the web using a module called Microsoft.Xrm.Data.PowerShell. Then it extracts the downloaded zip into a folder for the correct file structure. A nice thing about using the Microsoft.Xrm.Data.PowerShell dll is the fact it gives you additional CRM commands you can do. For example before downloading the solution it allows you to change the version number of the solution before downloading.
This is the error I received when trying to import a managed solution into an organization where an early version of it already existed.
From the import log :
Plugin Types import: FAILURE. Error: Plugin: [PluginAssemblyName], Version=18.104.22.168, Culture=neutral, PublicKeyToken=c66c1d5121b276ee of PluginTypeName: Microsoft.Crm.Entities.PluginType and PluginTypeNode: System.Xml.XmlElement caused an exception.
This one was new to me and caused me to have to do some digging, first I had to be reminded how to start digging, and the first step should be to enable tracing, which you can find here : https://support.microsoft.com/en-us/help/907490/how-to-enable-tracing-in-microsoft-dynamics-crm. Then after that do your import and go to the TraceDirectory to find the internal exception causing this import exception.
That lead me to this exception from the trace logs :
>Crm Exception: Message: Plugin Types import: FAILURE. Error: Plugin: [PluginAssemblyName], Version=22.214.171.124, Culture=neutral, PublicKeyToken= of PluginTypeName: Microsoft.Crm.Entities.PluginType and PluginTypeNode: System.Xml.XmlElement caused an exception., ErrorCode: -2147188718, InnerException: Microsoft.Crm.CrmException: A managed…
Recently, I came across a very odd issue in CRM 4.0. This issue popped up because of an improper deploy/refresh in conjunction with the removal of an entity between test and production servers. It was very out of the ordinary, and I had not seen anything like it before.
The Issue at Hand
This issue was that we were unable to publish the Appointment entity. We were able to publish all of the other entities, but trying to publish the Appointment alone would fail. We could import previous versions of the entity, but all of them had the same effect. This is a critical issue because if you are unable to publish an entity, then you can no longer modify that entity.
So this is when I started to dig around. I first noticed that where was a blank lookup field on…
I wanted to write about the topic of whether to repurpose system entities in CRM 2011 or create new custom entities. I know that there have been some blog posts about this before, but I can also reflect on this from personal experience.
There are many different points to consider when repurposing entities:
1. The out of the box functionality of the entity may not be exactly what you need. In these cases it might take a higher effort to modify and customize it then it would to start from scratch with a custom entity.
2. If you repurpose a system entity in CRM 2011 and package it in a solution, there is always the chance that another solution contains this entity. If these two solutions are imported into the same organization, this may cause a conflict.
3. You cannot change the icons for…
This tutorial will show you how to add and remove buttons to the ribbon in CRM 2011.
There are three different places you can add buttons to on the CRM Ribbon. They are the entities grid view (HompageGrid), the form (Form), and the in-line grid inside of another form or dashboard (SubGrid).
Adding a Button to the Ribbon
Adding a button has two parts, the first part is finding the control which we want to add the button to, and the second part is modifying the customization.xml file to add the button.
Part 1: Find the Control
Download and install the latest CRM 2011 SDK. (http://www.microsoft.com/downloads/en/details.aspx?familyid=420f0f05-c226-4194-b7e1-f23ceaa83b69)
Open the following Visual Studio solution from the SDK: $\sdk\samplecode\cs\client\ribbon\exportribbonxml\exportribbonxml.sln
Run the program, connect to the necessary CRM organization, and generate the files. Note, if you are connecting to an online organization, the connection URL will be crm.dynamics.com
Your command window will…
Microsoft Dynamics CRM (Or just CRM) has recently upgraded from version 4.0 to version 2011. For an overview of Microsoft Dynamics CRM head here: http://crm.dynamics.com. With this new release there have been many improvements to the system. One of the improvements that I think has great potential is the introduction of Solutions.
What is a Solution?
Solutions are essentially a container that holds the customization components supported by CRM. Solutions can hold many different components including Entities, Web Resources, Plug-ins, Reports, and Processes. A complete view of the Components is shown on the left below.
Solutions can be versioned and they are imported and exported as a whole. This single unit of software makes a re-deployment or upgrading a clients system a lot easier to manage for not only us, but also the client.
What did we have in CRM 4.0?
In CRM 4.0, there…