CRM 2011 – No reports working in CRM

I had a very odd and unusual problem, actually I say that most problems that involve reporting services are almost always odd and not unusual.

I was working on CRM which had already been setup (not by be) and the users were having problems with reports.

The problem was none of the built in reports were working, you also couldn’t upload any reports.

When you tried to run a report I got a

Microsoft CRM Error Report saying

Cannot run OOB report, unless SRS Data connector is installed

it is possible to use CRM with out SRS data connector working, you won’t have any reports.  The odd thing here was all the reports were in CRM, they just weren’t working.

I installed the SRS data connector but I was still getting the error message.

Initially I thought the problems were because the installation was done on a named instance.

The installation of the SRS connector seemed to work without any problems.  So I tried running the repairs and configs on the CRM server, still no joy.

I finally disabled the organisation, edited the organisation and then pressed next.  I got a message about the SQL server setup.

I ran the SQL Server configuration tool and found the FULL TEXT Search, SQL Server Replication and Client Tools connectivity had not been enabled.

I added the in and reinstalled the SRS Connector.  I now got a different error message in reports

Error occurred while getting the data source contents

which finally took me to this blog page

http://weblogs.asp.net/pabloperalta/archive/2011/09/05/error-occurred-while-getting-the-data-source-contents-for-the-report.aspx

One thing I also noticed is that when I went to the reports manager

http:///Reports/

there were no reports for any organisations, which explained why I couldn’t run any of the default reports but the question was how do I load them.

The blog post above says you can use the tool

PublishReports

which is a command line tool to load the default reports, you need to just pass it the name of your organisation

publishreports organisationName

after running this the reports were loaded into CRM and I could finally run reports.

it took me ages but I finally resolved all the problems

CRM 2015 – Getting the CRM License from the database

key_to_the_city_of_london_charles_lindbergh

A customer was moving their CRM installation to a brand new server and wanted to know the CRM license key.

I note down the CRM license key for each installation and keep them in CRM (where else would I put it!), you can also retrieve this information from partnersource or voice.

You can retrieve it from the MSCRM_CONFIG database with the SQL below.  The query is different for each version of CRM, Microsoft has a new column for each version of CRM.

USE MSCRM_CONFIG

SELECT LicenseKeyV5RTM FROM ConfigSettings

This is useful if you have inherited a CRM on premise .

I was updating this post and found this post had instructions to retrieve the license key from CRM 2013 and CRM 2015.
Dynamics CRM 2013

USE MSCRM_CONFIG
SELECT [NvarCharColumn] AS CRM2013LicenseKey FROM [MSCRM_CONFIG].[dbo].[ConfigSettingsProperties] S WHERE S.ColumnName = ‘LicenseKeyV6RTM’
Dynamics CRM 2015

USE MSCRM_CONFIG
SELECT [NvarCharColumn] AS CRM2015LicenseKey FROM [MSCRM_CONFIG].[dbo].[ConfigSettingsProperties] S WHERE S.ColumnName = ‘LicenseKeyV7RTM’

 

CRM 2011 – Trying to work out what active directory groups are for different organisations

In you development environment or maybe in live you might have numerous CRM organisations installed.

Each CRM organisation will have a separate batch of four active directory groups which CRM uses.

  1. UserGroup
  2. ReportingGroup
  3. PrivUserGroup
  4. SQLAccessGroup

If you create more than one organisation you will find yourself with 4 more active directory groups with no real way to tell what groups go with which organisation.

The only identifer between the groups is a guid in the name of each active directory group.

You can click on the AD group to see what users are members of the group but if it’s a development environment they are likely to be similar anyway.

This is a picture of my the active directory showing my dev AD groups.   Yep loads of them

This can also be a problem on live installations because failed installations will also create CRM AD groups and not remove them.

So how do you link the guid in the AD groups to a CRM organisation.  If you run the SQL query below on the MSCRM_CONFIG database on the Organization table you can get the name and guid for each organisation.

select databasename, friendlyName, id
from [MSCRM_CONFIG].[dbo].[Organization]

databasename               friendlyName id
Test_MSCRM               Test4E7A1C5A-197E-DF11-B9F6-00155D6A7C15
Demo_MSCRM             Demo     4CB007A4-9B51-E111-897F-00155D6A7C22

oddly the first organisation added seemed to be ok but then the other guids didn’t match up at all and I am left still searching for definitive method to link these.

 

I have also seen the guid in the trace files but I can’t quite remember where I found it.

Dynamic Connector – mapping OptionStrings in NAV to Optionsets in CRM

Firstly the article post below by the connector team was extremely useful, even if it took me a while to understand where they were putting the values because they didn’t have any screen shots.  I hope the connector team write some more blog posts because the Dynamic Connector users need all the help and documentation we can get.  The article below is exactly the kind of information which should be in a manual or wiki or at least written about a year ago and is the type of information which should be shared to help people get up and running with the connector.  whilst I am asking for the things, top of the list should be for the Dynamic Connector to have it’s own forum or if it has tell me about it.

http://blogs.msdn.com/b/dynamicsconnector/archive/2012/04/24/mapping-nav-optionstrings-and-crm-optionsets.aspx

Below shows my adventure mapping an OptionString in NAV to an OptionSet in CRM, which is harder than it sounds.

Field in NAV

Correspondence Type

*Blank*

Hard Copy

E-Mail

Fax

 

 

I created a new field in CRM called

NAV Correspondence Type

*blank*

Hard_Copy

E_Mail

Fax

So as we can see they basically have the same values

For the Contact to NAV Contact Card below is the code I had to put in.  basically a blank is shown in NAV as “_blank_”, so if the optionSet was blank in CRM (e.g. “”) I would put “_blank_”.  For some reason the values came through from NAV with an underscore e.g. Hard_Copy.

=If(EqualTo(NAV Correspondence Type\Name, “”), “_blank_”, NAV Correspondence Type\Name)

 

Going the other way – NAV Contact Card to Contact

The NAV Correspondence Type is hidden down the bottom.  It has a name and a value but we only want to use Name because we don’t have any way to match the values.

For this code I check to see if it’s “_blank_” and if it is just pass nothing “” otherwise we copy the name value across

 =If(EqualTo(Correspondence Type, “_blank_”), “”, Correspondence Type)

I also wanted to map a two options field in CRM to a checkbox in NAV.

In CRM the values are true and false and in NAV the values are Yes and No, they are close but not close enough to automatically map.  I have a feeling there could be an easier way to do this but I couldn’t find any dynamic examples, only hard coding examples.

NAV field

Exclude from Segment

CRM

CRM Exclude from Segment

 

The contact to NAV contact is shown on a picture above but here is the code

=If(EqualTo(CRM Exclude From Segment, “true”), “Yes”, “No”)

 

NAV Contact to Contact

=If(EqualTo(Exclude from Segment, “Yes”), true, false)

 

CRM 2011 – CRM Developer Toolkit – Error registering plugins and/or workflows. Supported deployment does not agree with message availability

I got the error whilst trying to deploy a plugin using the CRM development toolkit

Error 1 Error registering plugins and/or workflows. Supported deployment does not agree with message availability C:\Program Files (x86)\MSBuild\Microsoft\CRM\Microsoft.CrmDeveloperTools.CrmClient.targets 176 4 CrmPackage

This was an odd error and I couldn’t work out what was causing it. if you try and search for errors about the CRM development kit you get a lot of errors and information but not a whole lot of solutions going on.

The best bet would be to check Danial Cai’s blog

http://danielcai.blogspot.co.uk/2011/10/crm-developer-toolkit-is-officially-v10.html

Although  I didn’t find the solution to my problem here I did learn quite a bit about the CRM developer toolkit.

I finally worked out that I had set the plugin to work offline as well as online but I had not changed the Entity to work off line.

To fix the problem I went to my solution, went to the entity and ticked the checkbox

offline Capability for CRM for Outlook

Then it deployed successfully.

 

CRM 2011 – Javascript to set the current date and time

A quick blog entry and a suprisingly easy and small piece of code

In the code below I have function which gets triggered when a user ticks the confirm Closed checkbox it then sets the current date and time.

if the user untick the checkbox I wipe the date and time value.

The date functionality in javascript holds the current time as well

 function confirmClosedOnChange() {
 var closedConfirmed = Xrm.Page.getAttribute("new_closedconfirmed").getValue()

if (closedConfirmed) {
var currentDateTime = new Date();
Xrm.Page.getAttribute("new_confirmedcloseddate").setValue(currentDateTime);
} else {

Xrm.Page.getAttribute("new_confirmedcloseddate").setValue(null);
}
 }
 

CRM 2011 – Creating a Dev organisation on the same server

I had a customer who wanted to create a DEV organisation to practise tinkering with CRM on.

The easiest way to do this is to take a copy of the live organisation and import it.

I have done something similar when upgrading a CRM 4 organisation to CRM 2011 so I was confident I knew what to do.

The process was surprisingly easy, take a backup of your live database (not the MSCRM_CONFIG), which is the database with the company name_MSCRM.

you then restore the database and specify a different name for the DB.

You then pop into the CRM deployment manager and choose import database, run through the rest of the option and you have got yourself a DEV organisation.

For those of you who want to do this and are not impressed with the instructions above, don’t panic the blog post below runs through the process step by step

http://msdynamics2011.blogspot.co.uk/2011/10/how-to-copy-microsoft-crm-2011.html

The only downside is I guess you are then using up extra licences.