CRM 2011 – Custom reports not working

I had an unusual error today where the default reports worked but any custom reports just whirred a bit and then produced a blank page.

looking at the event viewer logs on the CRM server I found I was getting MSCRMREporting error saying

Report render failure. Error: An error has occurred during report processing. (rsProcessingAborted)

luckily typing this into the internet produced a few hits and this seems to be a problem quite a few people have experienced.

The solution to the problem was to do with SPN (service principal name) not being set.  I believe the reason for this was because I changed the service account which runs the services for CRM and by changing this it somehow had an effect on the reports and current SPN’s were not validating the reports with this new user.

To fix the problem I had to log onto the Domain controller and run this command line setspn instruction

setspn -a http/CRMSERVERNAME DomainName\crm service account

an example would be, if my crm server was called crm, my domain hosk and the user was called crmservice.

setspn -a http/crm hosk\crmservice

It also took me a while to get this to work and it was only when I typed everything in lower case that the setspn instruction finally worked.

I found the solution above from the two links below, they are worth reading because they explain the solution more thoroughly and the first one has other things to try if the setspn instruction does not resolve the problem

http://dynam1cscrm.wordpress.com/2011/05/17/dynamics-crm-2011-spn-and-windows-authentication-configuration-for-running-custom-reports/

http://blogs.salentica.com/direland/2011/12/28/when-crm-2011-custom-reports-dont-work/

 

Although the link below is a bit more information than you need I did find this quite interesting in explaining about CRM and SPN’s

http://blogs.msdn.com/b/crm/archive/2009/08/06/configuring-service-principal-names.aspx

 

CRM 2011 – Instructions on installing the Outlook Client Add on

One of the benefits of using CRM 2011 is utilizing CRM 2011 inside the outlook client, which makes tracking emails and appointments for CRM records quick and easy.

Before you can get these benefits you need to install the CRM Outlook Add in.  I have found some great resources on the subject.

I would say installing the outlook client for CRM 2011 is quite a straightforward process, although it can be a little bit tricky if it’s on citrix or terminal services because I think you have to install it but turn off the configuring choices by default.

Here is a guide to installing outlook for CRM Online

http://www.microsoft.com/en-us/download/details.aspx?id=1582

Here is a link to download the Microsoft Dynamics CRM 2011 Outlook client

http://www.microsoft.com/en-gb/download/details.aspx?id=27821

on here it has the system requirements

System requirements

Supported Operating Systems: Windows 7, Windows Vista, Windows XP

Microsoft Dynamics CRM for Outlook can be installed on computers that have any combination of the following:

Windows operating systems:

  • Windows 7 (both 64-bit and 32-bit versions)
  • Windows Vista (both 64-bit and 32-bit versions)
  • Windows XP with SP3
  • Windows Server 2008 and Windows Server 2003 when running with Remote Desktop Services (formerly Terminal Services)

Microsoft Office:

  • Microsoft Office 2010 (32 or 64-bit versions)
  • Microsoft Office 2007 (32-bit versions)
  • Microsoft Office 2003 SP3 (32-bit versions)

Below are some videos which go through the process of installing the Outlook Client for CRM 2011

This first one is good because it goes through the pre requisite requirements.

Session 1 – Installing the Outlook client for Microsoft Dynamics CRM 2011

http://www.youtube.com/watch?v=J0FO6iNK0pI

Installing the CRM 2011 Outlook Client

Outlook Client Overview – Microsoft Dynamics CRM 2011 Series by Zero2Ten

Is coding popular with the young?

I was asked (repeatedly) if I wanted to feature the graphic featuring below on my blog and I would commend the person for their persistence and polite manners, not forgetting promoting coding and learning coding is certainly a good thing to encourage.

I thought I would help promote the online college with their recruitment drive.  They are currently promoting an online coding course and coding would be an ideal thing to learn online (although if you wanted to all the content is free)

You can read more about it here

http://www.onlinecollege.org/Program-or-Be-Programmed

It raises the question of how many graduates are going into computer related jobs, even that sentence doesn’t sound right.  Before when you went into computers you were signing up to be a programmer, database person.  I remember my early CV’s stating I had Excel, Word skills.

Today all office jobs use a computer and the software is a lot easier to use.

In terms of are people moving into IT jobs, I had the feeling that the numbers were dropping and probably some of that is IT teachers in my experience have been rubbish and the stuff they were teaching was at least 5 years out of date.

I found this article from 2009

http://www.computing.co.uk/ctg/news/1832769/number-graduates-it-falling

and these in 2011 from the bbc saying coding is gathering enthusiasm.

http://www.bbc.co.uk/news/technology-15916677

Of course both seem not to be the most scientific and not really that useful.

I think coding would be a useful tool to learn with regards to getting a job in this tricky climate

Thanks to OnlineCollege.org for creating this graphicProgramming Infographic

CRM 2011 – in plugins only select the fields you need and not ColumnSet(true)

usually when I am first developing some code in a plugin I will select all columns in the query

e.g.

account Account= (account)service.Retrieve(account.EntityLogicalName, id, new ColumnSet(true));

Once I know the code is working I will change this to pass only retrieve the fields I need because this makes the code run quicker and it’s basically just lazy to select all the columns

I usually pass in a list

List<string> fields = new List<string> { “name”, “accountnumber”, “creditlimit” };

and set that to the columns.

 

Today I had to do this to fix a puzzling problem I was having.  My CRM was acting a bit wierd, I got a few timeouts when just viewing a custom entity form.  I couldn’t understand this at all because there wasn’t loads of field on the entity and there also wasn’t a lot of records so there was no reason I could the SQL should be running slow.

On the custom entity I did have a workflow which checked if certain fields changed and if they did it would set some fields on another entity.

I also had a plugin which was kicked off on the update event and in this plugin it was retrieving all the custom entity fields and then doing an update.

What was happening is I somehow triggered a loop which the workflow ran and this kicked off the update plugin, my criteria on running the update plugin were always being hit and then I was saving the whole record.  This triggered the plugin.  I ended up with initially 200 workflows had been kicked off for my custom entity.

Even after I fixed the criteria to run only when certain fields had been changed my workflow was still firing a few times.

This was valid because the custom entity was correctly being updated by the plugin but because I had retrieved all the fields the workflow was being triggered, this was not correct because the fields the workflow was monitoring were not actually have any data changed.

So I modified my code to only select the fields I was going to check/change and after I had done this the workflow stopped getting triggered incorrectly and a bonus my code ran a lot quicker.

Perhaps there is a lesson here for me, get the code selecting the correct fields from the start and don’t be lazy with retrieving and writing all the fields of an entity.

 

 

CRM 2011 – Failed to get priv user group information

I had a bit of fundamental CRM 2011 error today, no one could log on and a Microsoft CRM error report was filling the screen

Error Description:

Failed to get priv user group information. k = 4e7a1c5a-197e-df11-b9f6-00155d6a7c15 privUserGroupId: 0ce4ba01-99f4-4125-b14c-922c6ea67209, localSystemAdGuid: 00000000-0000-0000-0000-000000000000, Exception: Microsoft.Crm.CrmSecurityException: Could not find GUID for hosk

I think I have had this error before but I couldn’t find much when I did a google search.

Basically when you get an error which effects all users and is a security guid/id error it’s almost always due to the CRM 2011 Async service and for some reason it won’t be running.  There can be lots of reasons for this, things like the servers being restarted and the CRM servers kicks in before the domain controller, password on the CRM async service  expiring.

So I logged onto the server and restarted the CRM 2011 services

there are four or so services and they all start with Microsoft Dynamics, start them up.

 

I also restarted the CRM website just for good measure

CRM 2011 – Be careful removing fields from a form

I had written some javascript which retrieved values from a field which I was displaying on the form.

I had added an account field onto a quote product, so I could then use the account id to inject into some fetchXML in a subgrid so I only showed quote products which had only been sold to the the account selected on the quote.

I could have looked this up using a query but I thought I would add it onto the Quote Product form and pass the value using relationships.

It worked fine but as I came to release the code I thought I didn’t really need the account lookup field on the form so I took it off.

Then when testing my code it wasn’t working, so I pressed F12 and was ready to debug, except it wasn’t running my code because it was erroring whilst trying to get the account lookup field, with this error.

SCRIPT5007: Unable to get value of the property ‘getValue’: object is null or undefined

So the morale of the story is, you can only access fields in Javascript which are on the form.  The solution to this problem was to make the fields not visible.

This is logical when I stop to think about it because why would CRM load up all the variables which are not being used on the form, it would be a complete waste of time.

This was an early morning, not fully awake error but it does show you the danger of taking off variables from a form without seeing if any javascript uses those fields for something

Prometric second shot offers are back until 31st May 2013

I received an email saying the second shot is back, Hazaar. I think this will be particularly useful for the extending CRM exam which was quite tricky in it’s CRM 4 format.  I would also add that the actual tests are nothing compared to trying to find and book a test on the prometric website, which is easily one of the most confusing I have ever used, perhaps this is part of the test

http://www.microsoft.com/learning/en/us/offers/secondshot.aspx

This will interest people who are going to take a CRM certification because this offer gives you a free retake if you don’t pass first time.

This is good news for the Hosk because I will be taking my CRM installation and configuration exam soon.

I think the CRM exams are eligible, I do admit to getting a bit confused by the exam groups

The other important information is the vouchers expire 31st May 2012.

 

Here is some of the blurb from the site, you have to get a voucher in exchange for an email address

Here’s how it works:

  • For Microsoft Certification packs: In addition to saving at least 15 percent on the cost of the certification exams, you get one free retake for each exam you don’t pass the first time.
  • For single exams with Second Shot: If you fail your exam the first time you take it, you may use the same voucher for your retake exam.

Read the FAQ to find out more.

Here’s what to do:

  1. Register to receive a Second Shot voucher for either a single exam or a certification pack. Click a link in the table below to get started.
  2. Using the Second Shot voucher number, schedule and pay to take your initial exam through our testing provider, Prometric, at http://www.register.prometric.com.
  3. Take your exam.
  4. If you do not pass your exam the first time, you may register to take the same exam again at no charge, via http://www.register.prometric.com. Provide them with the same Second Shot exam voucher number when registering the second time. NOTE: Please wait one day after failing the exam to register for the retake, to allow for test results to be entered into the system.

Click a link in the table to order your Second Shot voucher.

VOUCHER EXPIRATION:

These vouchers expire on May 31st, 2013. All exams, including retakes, must be taken by May 31st, 2013.