Wednesday, 1 October 2014

Microsoft Dynamics CRM Reporting Extensions Error - Requested value ‘Geo’ was not found

When attempting the SRS Data Connector Installation, you may encounter the following error:


The error is Microsoft.Crm.Setup.SrsDataConnector.RegisterServerAction failed.
Requested value ‘Geo’ was not found

Solution
To fix this issue and complete the installation, follow these steps:

  1. Download CRM 2011 Update Rollup 6
  2. Install the SrsDataConnector that came with your CRM ISO. Click the Cancel button when the error message appears.
  3. Install the SrsDataConnector from the UR 6 download
  4. Go to the directory where the SRS Data Connector is installed e.g. C:\Program Files\Microsoft Dynamics CRM Reporting Extensions
  5. Start SetupSrsDataConnector.exe, select Repair and click Next



Tuesday, 30 September 2014

Microsoft Dynamics CRM Reporting Extensions Install Error

You may receive this error when trying to install the Microsoft Dynamics CRM Reporting Extensions (SSRS Data connector):

A Microsoft Dynamics CRM Server component is using the same account as the instance of SQL Server Reporting Services

Solution
Add a new Registry key to the computer that is running the SSRS Data Connector installation:

  1. Start, Click Run, type regedit, and then click OK.
  2. In the registry, find: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
  3. Right click MSCRM, and create a new DWORD Value with the name IgnoreChecks
  4. Double click IgnoreChecks, and enter 1 in the Value data field.

Monday, 31 March 2014

Update Organization Error - Microsoft.Crm.CrmException: Update Organization with Id=

Installing a Microsoft Dynamics CRM Rollup is an integral part of maintaining your system. However there are issues you may experience after you have completed the install, such as:

  • issues trying to launch CRM, which are now displaying an error message that isn't very useful.
  • importing a solution

Often the reasons for this is that the Organization itself has not been successfully upgraded. You can verify this by launching the Deployment Manager and checking the version as displayed below:

If you find that the version is incorrect, then you can right click on the specific Organization and use the Update option. At this point you may find yourself with a second issue, whereby the update itself is now failing:
Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction failed. InnerException: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An item with the same key has already been added.

To remedy this, connect to the Organization's SQL Database using SQL Management Studio and execute the following script:

declare @IncidentOptionSetId uniqueidentifier = '7779161B-0E32-4001-8D44-339C2D1FF1F0'
declare @IncidentSystemPicklistIdFor1000 uniqueidentifier = 'DE3D1468-D2F4-4BC6-8BF6-73C5C64C435D'
declare @IncidentPicklistValueFor1000 int = 1000

declare @CategoryOptionSetId uniqueidentifier = '3041D03C-4166-4814-A2D4-1E3D93CAF2F1'
declare @CategorySystemPicklistIdFor1000 uniqueidentifier = 'ECBEE2BC-BAD2-4723-8612-371B4CE8D9E5'
declare @CategorySystemPicklistIdFor1001 uniqueidentifier = 'DE121D28-F5DF-45F7-B6FC-E97B1604F747'
declare @CategorySystemPicklistIdFor1002 uniqueidentifier = '8612EA04-81CF-423B-ADF4-EF74EEA70A41'
declare @CategoryPicklistValueFor1000 int = 1000
declare @CategoryPicklistValueFor1001 int = 1001
declare @CategoryPicklistValueFor1002 int = 1002
declare @CategoryPicklistValueFor6 int = 6
declare @CategoryPicklistValueFor7 int = 7
declare @CategoryPicklistValueFor8 int = 8

declare @SystemSolutionId uniqueidentifier = 'FD140AAD-4DF4-11DD-BD17-0019B9312238'
declare @AttributePicklistValueLabelTypeCode int = 2
declare @AttributePicklistValueSolutionComponentType int = 4
declare @DeleteComponentState int = 2

declare @PicklistIdMapping table
(
OldId uniqueidentifier,
NewId uniqueidentifier
)

delete @PicklistIdMapping
insert into @PicklistIdMapping (OldId, NewId)
 select AttributePicklistValueId, NULL
 from MetadataSchema.AttributePicklistValue 
 where 
  Value = @CategoryPicklistValueFor6 and AttributePicklistValueId = @CategorySystemPicklistIdFor1000
  or Value = @CategoryPicklistValueFor7 and AttributePicklistValueId = @CategorySystemPicklistIdFor1001
  or Value = @CategoryPicklistValueFor8 and AttributePicklistValueId = @CategorySystemPicklistIdFor1002
  -- do not include incident status picklist in here 
 group by AttributePicklistValueId 
 having COUNT(*) = 1


delete MetadataSchema.LocalizedLabel 
from
 MetadataSchema.LocalizedLabel l
 inner join @PicklistIdMapping m on l.ObjectId = m.OldId
 where l.LabelTypeCode = @AttributePicklistValueLabelTypeCode


delete DependencyBase where DependentComponentNodeId in 
(
 select DependencyNodeId 
 from 
  DependencyNodeBase d
  inner join @PicklistIdMapping m on d.ObjectId = m.OldId
  where d.ComponentType = @AttributePicklistValueSolutionComponentType
)

delete DependencyNodeBase 
from 
 DependencyNodeBase d
 inner join @PicklistIdMapping m on d.ObjectId = m.OldId
 where d.ComponentType = @AttributePicklistValueSolutionComponentType


delete MetadataSchema.AttributePicklistValue 
from 
 MetadataSchema.AttributePicklistValue a
 inner join @PicklistIdMapping m on a.AttributePicklistValueId = m.OldId


delete @PicklistIdMapping
insert into @PicklistIdMapping (OldId, NewId)
 select AttributePicklistValueId, NEWID() 
 from MetadataSchema.AttributePicklistValue 
 where 
  Value = @CategoryPicklistValueFor6 and AttributePicklistValueId = @CategorySystemPicklistIdFor1000
  or Value = @CategoryPicklistValueFor7 and AttributePicklistValueId = @CategorySystemPicklistIdFor1001
  or Value = @CategoryPicklistValueFor8 and AttributePicklistValueId = @CategorySystemPicklistIdFor1002
  -- do not include incident status picklist in here 
 group by AttributePicklistValueId 
 having COUNT(*) > 1

update MetadataSchema.LocalizedLabel
set ComponentState = @DeleteComponentState
from 
 MetadataSchema.LocalizedLabel l
 inner join @PicklistIdMapping m on l.ObjectId = m.OldId
 where l.SolutionId = @SystemSolutionId and l.LabelTypeCode = @AttributePicklistValueLabelTypeCode

update MetadataSchema.AttributePicklistValue 
set ComponentState = @DeleteComponentState
from 
 MetadataSchema.AttributePicklistValue a
 inner join @PicklistIdMapping m on a.AttributePicklistValueId = m.OldId
 where a.SolutionId = @SystemSolutionId

update MetadataSchema.LocalizedLabel 
set ObjectId = m.NewId 
from
 MetadataSchema.LocalizedLabel l
 inner join @PicklistIdMapping m on l.ObjectId = m.OldId
 where l.LabelTypeCode = @AttributePicklistValueLabelTypeCode

update DependencyNodeBase 
set ObjectId = m.NewId
from 
 DependencyNodeBase d
 inner join @PicklistIdMapping m on d.ObjectId = m.OldId
 where d.ComponentType = @AttributePicklistValueSolutionComponentType

update MetadataSchema.AttributePicklistValue 
set AttributePicklistValueId = m.NewId 
from 
 MetadataSchema.AttributePicklistValue a
 inner join @PicklistIdMapping m on a.AttributePicklistValueId = m.OldId

delete @PicklistIdMapping
insert into @PicklistIdMapping (OldId, NewId)
 select AttributePicklistValueId OldId,
  CASE Value
   WHEN @CategoryPicklistValueFor1000 THEN @CategorySystemPicklistIdFor1000
   WHEN @CategoryPicklistValueFor1001 THEN @CategorySystemPicklistIdFor1001
   WHEN @CategoryPicklistValueFor1002 THEN @CategorySystemPicklistIdFor1002
  END NewId
 from AttributePicklistValueView
 where OptionSetId = @CategoryOptionSetId and Value in (@CategoryPicklistValueFor1000, @CategoryPicklistValueFor1001, @CategoryPicklistValueFor1002)

delete from @PicklistIdMapping where OldId in (@CategorySystemPicklistIdFor1000, @CategorySystemPicklistIdFor1001, @CategorySystemPicklistIdFor1002)

insert into @PicklistIdMapping (OldId, NewId)
 select AttributePicklistValueId OldId, @IncidentSystemPicklistIdFor1000 NewId
 from AttributePicklistValueView
 where OptionSetId = @IncidentOptionSetId and Value = @IncidentPicklistValueFor1000
delete from @PicklistIdMapping where OldId = @IncidentSystemPicklistIdFor1000 

update MetadataSchema.LocalizedLabel 
set ObjectId = m.NewId 
from
 MetadataSchema.LocalizedLabel l
 inner join @PicklistIdMapping m on l.ObjectId = m.OldId
 where l.LabelTypeCode = @AttributePicklistValueLabelTypeCode

update DependencyNodeBase 
set ObjectId = m.NewId
from 
 DependencyNodeBase d
 inner join @PicklistIdMapping m on d.ObjectId = m.OldId
 where d.ComponentType = @AttributePicklistValueSolutionComponentType

update MetadataSchema.AttributePicklistValue 
set AttributePicklistValueId = m.NewId
from 
 MetadataSchema.AttributePicklistValue a
 inner join @PicklistIdMapping m on a.AttributePicklistValueId = m.OldId


After executing this script, try again and the Organization should not update successfully, which in return should resolve your CRM launching and solution import issues. 

Hope this helps?

Thursday, 27 March 2014

CRM 2011 - Shows Mobile View instead of the Default Website After Rollup

You may have experienced an issue when opening the MS CRM web client in a browser such as Firefox or IE whereby the mobile version of the CRM web client is loaded rather than the traditional default website view. This is most commonly seen after installing a roll up e.g. UR 12.

The difference is in the URL, just use the second address in order to load the correct web client.

Mobile: http://domainname/m/default.aspx

Default: http://domainname/main.aspx#

Thursday, 9 January 2014

Microsoft Dynamics Solutions - Management & Best Practices

This post is to help clarify what the best approach is to manage and use Microsoft Dynamics CRM Solutions to distribute your customizations and software components through your various CRM Environments, from Development, QA, Staging and Production.

That said, there isn't really an ultimate approach which is 100% right or 100% wrong, rather each with its own pro's and con's.

Managed vs. Unmanaged
I don't want to go too deep into the differences between managed and unmanaged solutions, but it is important for you to understand why you would use one and not the other, based on your requirements.

Unmanaged
Commonly this is referred to as the source, where you can distribute the solution to a different CRM organization, but with the added flexibility of having the ability to further making changes to what has been installed. For example if there was a new entity, which a screen you didn't like the look of, then you have the ability to make changes to that screen.

You cannot uninstall a unmanaged solution, you have to individually delete each company manually.

Installing different versions of the same solution will just overwrite what was installed by the previous version, there is no unmanaged solution layering based on versions.

Managed
Commonly referred to as the compiled or build version. The main reason to use this, is to protect your solution. For example if you are a software vender which has built a great add-on solution, you want to sell this solution but do not want others being able to further customize or copy your hard work. There is an exception to the rule, where you do have the flexibility to mark specific components as customizable,  a good workaround if there was a scenario where you did want to give the option to change a specific part of your solution.

All managed solutions can be uninstalled, which automatically removes all components that were installed as part of that solution.

Managed Solutions can also be layered, this is where different versions of the same solution can be installed on top of each other. For example, version 2.0 of a solution can be installed on top of version 1.0. Now if there was an issue with version 2.0 and you needed to rollback, then you can uninstall 2.0 which would revert the system back to version 1.0.

What are the Options?
1. Single Solution - this is where all customization's and components are distributed within a single solution file

2. Multiple Solutions - where components are split into various solutions, for example:
Pro's & Con's
Single Solution
  • Pro's
    • Less dependency issues
    • Everything in one place, single install
    • All components have one version
  • Con's
    • Solution can become large
    • Releasing a change to a single component will require releasing all components in the solution. Developers who have incomplete items can become a bottleneck
    • Incomplete customization's can accidentally be exported and included in the solution
    • Cannot use different versions for different components. 
Multiple Solutions
  • Pro's
    • Smaller solutions
    • Categorize components into relevant solutions
    • Developers can work on components in different solutions in parallel with less concern of exporting incomplete customization's, or becoming a block point for a solution export
    • Don't have to release everything, only the solution that has a change 
    • Better Granularity with solution versioning, as each solution can have its own version number
  • Con's
    • Installation will fail if dependent components do not exist, dependent solutions must be installed prior. Thus the order by which the solutions are installed becomes very important.
    • More than one solution is required to fully install your entire solution, as the various components are split between several solutions
    • Rollback requires you to uninstall each solution
Conclusion
Many times I've had to make the decision, whether to go with a single or multi solution approach. I have devised an easy method of selection, depending how and who you are targeting the solution for.

Single Solution
Software House - if you plan on targeting your solution for sale as a product based solution, then I would recommend using a single solution as the release cycle for this product will be managed by you the software vendor and your customers would expect an easy upgrade process between versions. Also simplifies the uninstalling process for the customer.

Multi Solution
In House - for an internal CRM project. Having the ability to make changes and perform smaller releases and hot fixes outside major releases are much more likely. Think about all those business users that say one thing but want another. Reacting to bugs can also become easier to manage due to the ability of smaller deployments, as you have the ability to release only the solution that has changed. As the development project is managed by you and not a third party software vendor, using a multi solution approach makes much more sense. 

Mixed Mode
Hopefully this won't confuse you further, but a mixed mode of the two could also be utilized  Whereby you use a multi solution approach during development and then merge and produce a single solution for production release.

Action Microsoft.Crm.Setup.Common.Analyzer +CollectAction failed. Fatal error during installation

When installing the Srs Data Connection (Microsoft Dynamics CRM Reporting Extensions), you may have experienced the following error: ...