Solution With Id = 86ac16ec-41d7-4685-a330-0b1c31411260 Does Not Exist

In some rare scenario's you might get the error message "solution With Id = 86ac16ec-41d7-4685-a330-0b1c31411260 Does Not Exist" while deleting a solution. In our scenario this seems to happen after using the holding solution approach. Luckily this can be solved as long as you have access to the SQL database. Note: Direct SQL updates are unsupported, so only perform this action if you're aware of the risks.

The error appears due to some remaining AttributeMap records for virtual attributes. In more detail, when you create an attribute map between two entities for a lookup attribute, it not only creating an attribute map for the id of the entity, but also for the name of that particular lookup. So in case of an account mapping, it creates an attribute map for accountid as well as accountidname. After moving around with solutions, CRM occacionally forgets to update the owning solution id for the 'name' attribute mappings.

You can visualize the relevant attributes using the following query:

FROM attributemapbase a
LEFT OUTER JOIN attributemapbase pa
 ON a.parentattributemapid=pa.attributemapid
WHERE a.solutionid='86ac16ec-41d7-4685-a330-0b1c31411260'

You'll see the virtual attributes with their parent attributes and the corresponding solutionid according to the attribute map. The mismatch between the solutionid of the attributemap and the solutionid of the parent attribute map is what causes the error while deleting the solution. Updating the solutionid will solve the issue for you. Here's the query to help you perform this action. Obviously you'll need to change the solutionid to the solutionid as presented to you when downloading the error log file:

UPDATE AttributeMapBase
 SET SolutionId = pa.solutionid
 FROM AttributeMapBase
LEFT OUTER JOIN AttributeMapBase AS pa
 ON AttributeMapBase.ParentAttributeMapId = pa.AttributeMapId
WHERE AttributeMapBase.SolutionId = '86ac16ec-41d7-4685-a330-0b1c31411260'

I'm sure Microsoft will fix this issue sooner or later, but for now I hope this post will help you anyway.

Processtrigger error messages and the holding solution approach

The holding solution approach, sometimes referred to as a shadow solution or the shared publisher technique, is the recommended approach for removing solution components from a CRM organization. Generally this works ok, however we have been facing some challenges lately. Some errors that you might encounter:

- Crm Exception: Message: processtrigger With Id = 3922b595-8637-e511-80d3-b13ac3e6ed07 Does Not Exist, ErrorCode: -2147220969

- 0x80040203 Could not retrieve parent object id for label with id 1f26a158-cf40-e511-80d6-f0b8a7508109 and label type code 19

- Cannot find a top solution for ProcessTrigger:3922b595-8637-e511-80d3-b13ac3e6ed07

My analysis has shown that there is a challenge with Business Rules when using the holding solution approach. The option that I found to get this working is to temporarily remove the business rules from the holding solution. Here's how you can get this to work:

- Export solution as managed
- Export solution as unmanaged
- Remove troubling business rules [1]
- Export the solution as managedHolding
- Import the unmanaged solution in your dev environment.

You now have a managed solution export which does have the business rules, but a managedHolding solution which doesn't have the business rules. Make sure to change the unique name of the solution and you're set to go. In your target environment:

- Import the managedHolding solution
- Remove the previous solution
- Import the managed solution
- Remove the managedHolding solution

And that should do the trick! Now let's hope that this will be fixed soon.

[1] To find out which business rule is the cause of the problems, copy and paste the processtriggerid into the following query and run this on your database. For CRM online it'll be a bit more challenging to find out which business rule is causing the issue.

processid, (select workflow.Name from workflow where workflow.WorkflowId = ptb.processid),
solutionid, (select FriendlyName from solution where solutionid= ptb.solutionid),
ProcessTriggerBase ptb
ProcessTriggerId = '3922b595-8637-e511-80d3-b13ac3e6ed07'

For more information about the technique, have a look at Microsoft's document: ALM for Microsoft Dynamics CRM 2011: CRM Solution Lifecycle Management.


Retrieve CSV file uploaded to CRM standard import

In some rare cases you wish you could retrieve the file uploaded to CRM. Unfortunately, there is no way that CRM is going to return you this file...

But luckily, in OnPremise and some Partner Hosted environments, it is possible to access the underlying database. This is where you can find the data for each of the rows which allow you to recreate the CSV (or XML) file.

The following query will retrieve all the relevant information:

SELECT ifb.ImportFileId,
  FROM ImportDataBase idb
  LEFT OUTER JOIN ImportFileBase ifb ON idb.ImportFileId = ifb.ImportFileId
  WHERE ifb.ImportFileId = 'DEAC184E-D7CA-E311-B83A-00155D083043'
  ORDER BY Source, LineNumber

Of course you'll need to change the importfileid GUID or change this to select based on the source (the name of the imported file). Then Copy the header row, followed by each of the data rows and your source file is recreated.

Good luck!

Restore removed sitemap entries

In Dynamics CRM you can work with solutions that stack on top of other solutions. This does require some careful planning and consideration during development as a change in one organization impacts other organizations. One of these changes are changes to the sitemap. If you add a sitemap entry in one solution and remove this in the second, then in a 3rd organization this entry will not be visible. However, how do you restore this entry?

CRM will place the following actions in the sitemap node of the customizations file when you export this as a managed solution. For the first solution where you add the sitemap entry:
<SubArea Entity="cht_yourentity" Id="cht_yourentity" AvailableOffline="false" PassParams="false" ordinalvalue="0" />

In the export for the second solution where you remove the sitemap entry:
SubArea Entity="cht_yourentity" Id="cht_yourentity" AvailableOffline="false" PassParams="false" ordinalvalue="0" solutionaction="Removed" />

As you can see, the solutionaction is removed. So, how can you remove this solution action?

Dynamics CRM is generating the actions based on the current state of the sitemap compared to the other existing (managed) solutions. This means that if you add a new sitemap entry in the second solution, then this will not be recognized as a difference and hence the solutionaction will be removed.

In short, just add a new sitemap navigation entry and this will solve your problem.


Dynamics CRM instruction video's in Dutch!

Just recently Microsoft has started to provide instruction video's not only in English, but also in other languages. And, one of these foreign languages is Dutch!

You can find the first video's on Youtube's channel "Microsoft Dynamics CRM Product Information Dutch"

The currently available video's are:
- Aan de slag met Microsoft Dynamics CRM 
- Nieuwe navigatie voor Microsoft Dynamics CRM Online 
- Microsoft Dynamics CRM voorjaar 2014 - Wachtrijverbeteringen 
- Microsoft Dynamics CRM voorjaar 2014 - Overzicht van servicebeheer 
- Snelle tips voor CRM voor tablets 
- Snelle tip voor CRM 2013: snel toegang tot klantgegevens in Microsoft Dynamics CRM 
- Snelle tip voor CRM 2013: voeg snel nieuwe informatie toe via snelkoppelingen 

Change the AggregateQueryRecordLimit for 1 organization

In CRM there are a couple of thresholds created to guarantee performance of the application. Though this is a good thing, it does cause some issues every now and then. One of these thresholds is the AggregateQueryRecordLimit.

You will find that CRM uses this threshold as soon as you want to view a chart or execute an aggregation in a report over more than 50.000 records. If this is the case, then CRM will present you with the error message "AggregateQueryRecordLimit exceeded. Cannot perform this operation.".

Multiple guys have posted about changing this setting (hint:
update DeploymentProperties set IntColumn = 250000 where ColumnName = ‘AggregateQueryRecordLimit’), but this allows every organization in your instance to exceed this threshold, while you might only want to allow one organization to do this.

Though it is not documented in the SDK, it is possible to set this value for just a single organization. Just as easy as updating the deploymentproperties table, you can also add a record to the organizationproperties table (in the MSCRM_CONFIG database):

INSERT INTO MSCRM_CONFIG.dbo.OrganizationProperties (Id, ColumnName, IntColumn)
VALUES ('8CB2768E-1585-E411-80BC-D4490D33C5AC', N'AggregateQueryRecordLimit', 250000)

Obviously you'll need to replace the guid with the ID of your organization (select id, FriendlyName from Organization) and the number in the end with the amount of records you would allow to be aggregated.


Create icons for Dynamics CRM 2013/2015/Online

Back in the days of Dynamics CRM 2011 full color icons were the default, but now Microsoft has changed the look and feel. This new user interface of Dynamics CRM does require you to rethink how to work with icons. The larger icons appear to be blueish and white when you hover over them, while the smaller icons are grayish.

The guys at Magnetism have done a great job describing where these icons are displayed, however it would also be useful to have some guidance on how to create these new icons. You can of course go back to a designer and have this done for you, but there are some easy tricks to get existing icons updated or redesign any of the free resources to match the new UI.

First of all, it's good to know that the icons in the menu bar which appear as light blue, aren't actually blue. The icons are white (RGB: FFFFFF), but CRM renders them in light blue until the user hovers over. This means that while developing your 32x32 pixel images, you can make them white. An easy and cheap approach to do this, is to use

Within, you can open the image:

 Then go to "Adjustments" -> "Curves":

Drag the dot from the left top to the right top. You'll see the code change from (0, 255) to (255,255):

And your image appears in white.

The smaller images, only used for entities, the color is in gray shades. You can either use the same approach as above to transform the image to gray, but an even easier approach is to use the black & white option:

After saving your images, then you can upload them to CRM as a web resource and start using them in the sitemap or as entity icons.