CRM 2011 – Understanding Solutions in CRM 2011

Solutions is one of the biggest development changes in CRM 2011 and it will take a little bit of time for people switching from CRM 4 to CRM 2011 some time to get their heads around it.

When you do you will find it is a massive improvement not only in terms of keeping only the changes you have made in a seperate solution but most importantly it’s a huge improvement in deploying CRM 2011.

For developers the way to understand solutions is basically to think of them like projects in Visual Studio.  You could almost think of each entity or section (processes, javascript etc) as a separate project adding into a visual studio Solution.

The good news is they are easy to learn and you will soon have mastered solutions and then you will wonder how you ever managed in CRM 4.  The biggest benefit I have found is its easy to keep track of your changes, particularly with javascript with the added bonus of you know being able to use the same Javascript with multiple entities.

Richard Knudson who is one of the leading CRM bloggers has written an introduction to Solutions and like most of his articles it’s is excellently written. You can read it here

Dynamics CRM 2011 Solutions, Part 1

if you prefer to learn by watching videos then the channel 9 series is probably the best ones I watched on the subject and they are by David Yack so you are in very good hands

Solutions – Introduction

Solutions – Introduction

Solutions – Managed & UnManaged

Solutions – Managed & UnManaged

Solutions – Publishing

Solutions – Publishing

 

 

CRM 2011 – Why Microsoft Dynamics CRM 2011 will soon be leading the CRM Market

I read an article today with the title Four Ways Microsoft Dynamics CRM keeps up with the changing tide, a good attention grabbing title but it did make some good points highlighting why Microsoft Dynamics CRM is on its way to be the leading CRM supplier.

Below are the four main points but I think the biggest selling point for CRM 2011 is the not only the current price of CRM 2011 online but the idea of CRM in the cloud.  The current offer price (a very good price if you are converting from salesforce) makes it very attractive for companies to use CRM.  One of the biggest barriers in using CRM 2011 was purchasing the hardware and software licences.  The cost of setting up CRM can be a lot to begin with and companies don’t know how successful it’s going to be, with CRM 2011 online it means companies can try CRM for free and then just pay monthly fee to keep using it.  If they later wish to change to an on premise version than you can upgrade but at least you have tried it for a reduced fee.

The other points the article below makes are valid and I think the improved aesthetics of CRM 2011 is certainly a strong selling point, it makes demoing CRM 2011 a lot more enjoyable. I think it’s important for CRM 2011 to keep this momentum up, keep improving this aspect but if they want to really makes some news then they need to bring multi browser capability and bring in social media into the next release of CRM 2011.  You may read this believing social media is over hyped and not as important as I am making out but I have heard people mention chatter on salesforce as a reason to move from CRM 2011 to Salesforce.   I also believe twitter, blogs, IM and even skype will become more integrated into companies in the future.  At the moment social media and the tools I have just mentioned are perceived to be important and growing in important but in the coming years they actually will be.  For the same reasons the improved look and feel of CRM is a persuasive tool to people moving to Microsoft CRM Dynamics 2011, it’s basically an easier sell outwardly and inwardly to a company.  Here is the list

  1. Full CRM Suite: You can cover all the bases with access to sales, service, marketing, and social CRM with Microsoft Dynamics CRM. Integrating these capabilities into your day-to-day business tasks increases productivity and helps you stay ahead of the game.
  2. Flexible Configuration and Customization: With Microsoft Dynamics CRM, you can create point and click configurations and easily turn a vanilla solution to one specific to your business needs. Every business has their own processes, terminology, and goals, so ensuring your CRM system can align with yours is what makes the solution work for you.
  3. Better User Experience: User adoption is the number one pitfall of implementing a new technology solution. Microsoft Dynamics CRM’s easy user experience ensures that every employee knows how to use it to get what they need.
  4. Affordability: Microsoft Dynamics CRM is now affordable to companies of all sizes: large enterprises to small businesses. With the varying options for deployment, such as CRM online and partner hosting, you have a choice and it won’t cost you a large upfront expense to get what you need.
I also think one of the biggest selling points is the ability to extend CRM using dotnet and the SDK allows you to create portals and other web apps, this combined with the new licensing makes it potentially very powerful and a great money saver.  I think this is a change of how organisations currently use CRM so it will take a while before the companies offering solutions and the companies buying solutions get their heads around it.
I don’t think Microsoft have only just caught up with the changing tide but I think they are quickly going in the right direction and will soon be surfing the wave.

CRM 2011 – Average CRM wages UK – May 2011

I recently wrote a blog about CRM recruitment from a recruiters perspective and you can read about that here, the gist of the article was there had been an increase in the amount of CRM work.

I wondered if this would have any difference on the wages paid to CRM developers/consultants so I had a google for information and found the IT job board had some information which I have pasted below.  The results are interesting, it seems the average salary has gone up from last year, the number of permanent jobs has gone up but not by much over the last 3 months.  The rank for developer has dropped.  Still it’s interesting the average wage is £45000

Permanent

Description Rank
3 Months to
30 May 2011
Rank Change
on Same Period
Last Year
Average Salary
3 Months to
30 May 2011
Average Salary
% Change
on Same Period
Last Year
Matching Job Ads
(% of Permanent
IT Job Ads Sampled)
Last 3 Months
Find
Jobs
CRM 66 Down-11 £47,500 +5.55 % 4560 (3.70 %)  
Rank up 27 places Dynamics CRM 249 Up+27 £45,000 1167 (0.95 %)  
Dynamics CRM Consultant 732 Down-28 £47,500 +11.76 % 129 (0.10 %)  
Dynamics CRM Developer 746 Down-31 £45,000 115 (0.09 %)  

Contract

Description Rank
3 Months to
30 May 2011
Rank Change
on Same Period
Last Year
Average
Daily Rate
3 Months to
30 May 2011
Average Daily Rate
% Change
on Same Period
Last Year
Matching Job Ads
(% of Contract
IT Job Ads Sampled)
Last 3 Months
Find
Jobs
CRM 66 No change0 £400 +4.57 % 1647 (2.74 %)  
Rank up 91 places Dynamics CRM 276 Up+91 £375 -0.66 % 378 (0.63 %)  
Rank up 11 places Dynamics CRM Developer 503 Up+11 £375 +7.91 % 81 (0.13 %)  
Dynamics CRM Consultant 552 Down-31 £350 -2.43 % 32 (0.05 %)  

 

CWJobs also had an average CRM wage calculator, although I would say it didn’t have a section for Microsoft or dynamics CRM jobs

Salary results for CRM

Sample size
916

Low
£37,500

High
£77,500

Average
£57,500

CRM 2011 – Quick tip – using EntityLogicalName in query expressions

This is a tiny small tip for writing query expressions and using the EntityLogicalName value.

When you write a queryExpression you have to specify the name of the entity you want to query.

The name is a text string you can create a string and put the name of the entity

                QueryExpression query = new QueryExpression("account");

a better way which makes the code easier to read and will ensure you don’t mistype the query is to use the EntityLogicalName attribute of a CRM entity.  Below is an example of doing a query expression for the account

                QueryExpression query = new QueryExpression(Account.EntityLogicalName);

 

CRM 2011 – Setting an OptionSetValue in a plugin

I had to set an OptionSetValue in a plugin this week and for some reason I totally forgot how to do it, which kept causing my plugin to crash.

Like all things in CRM, once you have done it you wonder what all the fuss was about and how simple it seems but before you have cracked it, it can be very frustrating.

The other unusual thing I found was I couldn’t Google any examples, so I thought I would show an example on this blog so if I can’t do it in the future at least I would know where to look.

I will briskly take you through the basics.  OptionSetValue is a drop down list in CRM.  The OptionSetValue is a list of int values linked with a metadata list of text values.  I think it is done like this so you can store the OptionSets in a database and you have to split them up.

If  you want to find the text value you have to lookup the value in the metadata, I have blogged about that before, go here if you want to know how to look up the metadata value of an optionSet

The main thing which was confusing me is firstly OptionSetValue is a class and to then get the actual OptionSetValue you have to put you class name and then Value.  For some reason I was then trying to set just the value, which is stupid when I think about it but it was late on a Friday and my brain had clearly stopped working for the week.

OptionSetValue is a class and it has two constructors, click here for the api

Name Description
OptionSetValue () Initializes a new instance of the OptionSetValue class
OptionSetValue (Int32) Initializes a new instance of the OptionSetValue class

Now you can see that one of the constructors takes an int32 value.  Most of the time if you are creating an OptionSetValue which you want to write to a CRM object then you will pass in the int value of the optionset.  This is a common Gotcha, people will often set this value to a value which isn’t in the OptionSet values in CRM.  To find the values, you need to open the entity going through solutions (basically as if you are going to edit it) with the optionset you want the values for.

Selected the optionSet in the fields, open the optionSet until you have a list of the Options.  When you select one of the options you will see on the right it shows you the optionset Label and below that is the value (which is an int)

So from the above you can see the int number you want to assign to the optionSetValue is 143570000.

so to create and set an OptionSetValue you would do this

    OptionSetValue op = new OptionSetValue(143570000);
                shortlist.new_StatusSelectedCheckbox = op;

In the example shortlist is an entity object and new_StatusSelectedCheckbox is the field.  To get the value from an optionSetValue you would do this

op.Value;
143570000

the number below is the value.

As I have said before one of the most common problems people will experience is they will try and set an OptionSetValue to an int number not in the list of dropdown values.

The OptionSetValue class api is here but it really only has the Value method to set and get int value of the OptionSetValue class

 


					

CRM 2011 – A Recruiters perspective of the CRM Dynamics Market

http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&discussionID=54898273&gid=3610819&trk=eml-anet_dig-b_nd-pmr-cn

I saw a group discussion in linkedin and there was an interesting discussion with the title – A RECRUITERS PERSPECTIVE INTO THE DYNAMICS MARKET

Why he had to put the title all in capitals eludes me but then I also wonder if sending random jobs to every email address they have actually yields any positive results, I hope it doesn’t (then maybe it might stop) but someone must reply or they would probably stop.

From a recruitment perspective the last 6 months have been very exciting in the Dynamics market place, especially within the CRM & AX areas with record new hires in both these areas, and a massive increase in requirements for end users and consultancies alike. Needless to say it has been a very busy year to date.  I will highlight a couple of the interesting paragraphs from his discussion

The latest release of CRM turned a lot of heads with a whole host of Borough Councils & current users pressing forward with CRM 2011 implementations and candidates actively putting themselves in the market to gain hands on 2011 experience. A number of Microsoft Dynamics consultancies have been winning new projects and therefore had to adopt an all hands on deck approach, which explains the current demand for contract candidates at the moment.

It’s interesting to read that the amount of Microsoft CRM 2011 work has increased to such an extent that they are taking on people without CRM experience.

I also found this point interesting

Salaries have maintained a constant level over the past year, in particular within consultancies. However if you have the right level of experience and you are looking for a permanent opportunity you have a much better opportunity to command a better salary. In short permanent candidates are a very sought after commodity at the moment however there is still very much a strong market for contractors.

It’s interesting that wages have basically stayed around the same level, unless you have a lot of experience.  I get the feeling there are a lot of people with less than a year’s experience working on CRM projects to basically fill the sudden increase in CRM 2011 work.

I was also wondering how the increase in certifications needed for gold partner has changed the CRM 2011 workplace.  Most job adverts indicate they would like people who are certified in CRM.

Interesting, I think experience over a number of CRM projects is important because CRM is an unusual beast.  It uses common tools like .NET, ASP.NET and Javascript to extend CRM 2011 but you really need some experience because there are certain things you have to do a certain way.

In my experience people seem to be too focused on getting people with .NET experience but I would CRM experience is more useful because the level of .NET code for most CRM extensions is quite simple and straight forward but it is different from most .NET projects and takes a bit of time to learn.

CRM 2011 – Will Denali, the new version of SQL Server help ease the pain of creating reports in CRM 2011

This week I have been writing some reports using SSIS and have been tearing my hair out at the slow and painful process using SSIS can be.  Writing reports in CRM 2011 is one area Microsoft really need to improve.

I have read on a few blog posts that in the next release of SQL Server which is codenamed Denali might improve this so I tried to find some information on it and I have found a bit of information but nothing to get my hopes up.  The good news is Denali is meant to be released in 2011 and you can see from the table below, which I found here

Sql Server historical releases

In 1988, Microsoft released its first version of SQL Server. It was developed jointly by Microsoft and Sybase for the OS/2 platform.

  • 1993 – SQL Server 4.21 for Windows NT
  • 1995 – SQL Server 6.0, codenamed SQL95
  • 1996 – SQL Server 6.5, codenamed Hydra
  • 1999 – SQL Server 7.0, codenamed Sphinx
  • 1999 – SQL Server 7.0 OLAP, codenamed Plato
  • 2000 – SQL Server 2000 32-bit, codenamed Shiloh (version 8.0)
  • 2003 – SQL Server 2000 64-bit, codenamed Liberty
  • 2005 – SQL Server 2005, codenamed Yukon (version 9.0)
  • 2008 – SQL Server 2008, codenamed Katmai (version 10.0)
  • 2010 – SQL Server 2008 R2, Codenamed Kilimanjaro (aka KJ)
  • Next – SQL Server 2011, Codenamed Denali
I did finally find a blog with top 9 features in Denali, you can read the whole blog post here but these features did give me some hope

3. Juneau

Juneau is the code name for the new SQL Server Development Tools. Its purpose is to provide a single development environment for all database related project types including bringing BIDS (Business Intelligence Development Studio) and SSMS (SQL Server Management Studio) into the same IDE.

4. Apollo

Apollo is the codename for Column-based Query Accelerator. I have to admit that this is the feature I’m most excited about. I watched some impressive demos showing how much performance gain is realized on very large result set queries. Microsoft claims an approximate 10 times increase in query performance.

Columnstore Indexes are what is set up to provide for this increase in query performance. Essentially, instead of storing rows on pages, columns are stored individually on a set of pages. Algorithms can then be used to compress the redundancy out of the column. Thewhitepaper on the new Columnstore Index points out the following benefits:

  • only the columns needed to solve a query are fetched from disk (this is often fewer than 15% of the columns in a typical fact table),
  • it’s easier to compress the data due to the redundancy of data within a column, and
  • buffer hit rates are improved because data is highly compressed, and frequently accessed parts of commonly used columns remain in memory, while infrequently used parts are paged out.

5. Crescent

This cool new tool aimed at the business user is actually still yet to come. Project “Crescent” furthers Business Intelligence for everyone by providing a powerful and speedy data visualization tool in the browser. It has a feature called storyboarding which allows the user to create multiple snapshots of the data in order to tell a story about that data. Once the snapshots are created, the storyboard can be exported to PowerPoint where the data is displayed live inside the PowerPoint slides. The demos of this product are a must-see. Below are two links. The last is the keynote from Day 1 of the PASS Summit (by Ted Kummert, Microsoft Sr. Vice President, Business Platform Division) and contains a lot more than just Project Crescent.

Data Visualization Done Right: Project Crescent

PASS Summit 2010 Day One Live Streaming Keynote

so at the end of the article I am starting to feel a bit more hopeful but because I haven’t heard anything about the release of a new version of SQL server then it does dampen my enthusiasm a bit.  Please Microsoft help ease the pain of many CRM developers by improving the reporting in CRM 2011.

CRM 2011 – Getting the ServerUrl in Javascript and using Xrm.page

Whilst I was developing I had hard coded the serverUrl which I then used whilst doing an oData query.

So when I moved the code from the Dev system to production for the first time, my trusty Javascript stopped working.  I know you shouldn’t hard code stuff like this and I had only done it in development to get oData working.

The quick answer for those of you who have Googled your way to my blog, is you use the Xrm.page.context and use the method getServerUrl();  This will return you the url, including the organisation.  After that all you have to do is paste the oData address.

var serverUrl = Xrm.Page.context.getServerUrl();
var GlobalODataPath = serverUrl + "/XRMServices/2011/OrganizationData.svc";

this is the code I used to do the oData call
function retrieveUserRecord(Id) {

var select = "/SystemUserSet?$select=InternalEMailAddress&$filter=SystemUserId eq guid'" + Id + "'";

    ///SystemUserSet?(guid'4d82f1fc-262e-e011-9645-00155d106b02')
    showMessage("retrieveUserRecord function START");
    var retrieveUserReq = new XMLHttpRequest();
    retrieveUserReq.open("GET", GlobalODataPath + select, true);
    retrieveUserReq.setRequestHeader("Accept", "application/json");
    retrieveUserReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    retrieveUserReq.onreadystatechange = function () {
        retrieveUserReqCallBack(this);
    };
    retrieveUserReq.send();
    // showMessage("retrieveAccountRecord function END.");
    showMessage("retrieveAccountRecord function END.");
}

function retrieveUserReqCallBack(retrieveUserReq) {
    if (retrieveUserReq.readyState == 4 /* complete */) {
        if (retrieveUserReq.status == 200) {
            //Success
            var retrievedUser = JSON.parse(retrieveUserReq.responseText).d;
            showMessage("ACTION: Retrieved email address = \"" + retrievedUser.results[0].InternalEMailAddress);
            setValuesIFrameQueryString(retrievedUser.results[0].InternalEMailAddress);
        }
        else {
            //Failure
            showMessage("retrieveAccountReqCallBack function failure END");

        }
    }

}

Although the initial change from CRM 4 to CRM 2011 Javascript has a steep learning curve, once you are get used to it the CRM 2011 is I think better than CRM 4.  One of the cool new features is the Xrm.page object.  This is a object which Microsoft generate and fill with lots of lovely variables and methods.

It has three useful parts to it.  What I really like is the separation Microsoft has done here, it’s logical and easy to use.

Xrm.Page.context
Xrm.Page.context provides methods to retrieve information specific to an organization, a user, or parameters that were passed to the form in a query string
Xrm.Page.data.entity
Xrm.Page.data provides an entity object that provides collections and methods to manage data within the entity form
Xrm.Page.ui
Xrm.Page.ui provides collections and methods to manage the user interface of the form.
Out of the the three the one I use the most is Xrm.page and it has some great methods to get default/organisational information from.
  • getAuthenticationHeader: Returns the encoded SOAP header necessary to use Microsoft Dynamics CRM 4.0 Web service calls usingJScript.
  • getCurrentTheme Returns a string representing the current Microsoft Office Outlook theme chosen by the user.
  • getOrgLcid: Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the base language for the organization.
  • getOrgUniqueName: Returns the unique text value of the organizations name.
  • getQueryStringParameters: Returns an array of key value pairs representing the query string arguments that were passed to the page.
  • getServerUrl: Returns the base server URL. When a user is working offline with the Microsoft Dynamics CRM for Microsoft Office Outlook client, the URL is to the local Microsoft Dynamics CRM Web services.
  • getUserId: Returns GUID value of the SystemUser.id value for the current user.
  • getUserLcid: Returns the LCID value that represents the Microsoft Dynamics CRM Language Pack that is the user selected as their preferred language.
  • getUserRoles: Returns an array of strings representing the GUID values of each of the security roles that the user is associated with.
  • isOutlookClient: Returns a Boolean value indicating if the user is using the Microsoft Dynamics CRM for Microsoft Office Outlook client.
  • isOutlookOnline: Returns a Boolean value indicating whether the user is connected to the Microsoft Dynamics CRM server while using the Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access client. When this function returns false, the user is working offline without a connection to the server. They are interacting with an instance of Microsoft Dynamics CRM running on their local computer.
  • prependOrgName: Prepends the organization name to the specified path.

CRM 2011VM is available to download on partnersource

The man with the best CRM 2011 tools in the business, which are

CRM 4 to CRM 2011 Javascript converter

CRM 2011 OData query designer

has just released an interested post.  I am talking about Rhett Clinton, if you haven’t used the two tools above go to his blog and check them out, they are excellent.  I was using the OData query designer this week, it comes as a managed solution (which means you can’t change anything – basically think read only) and the query designer is an easy to use and nice looking Silverlight app.

Anyway in his current blog he informs us that the CRM 2011 VM is available to download on partner source which you can get here PartnerSource

I thought I would share the knowledge

CRM 2011 – How to Schedule Recurring Workflows in CRM 2011

Gonzalo Ruiz has recently been writing some excellent CRM blog entries and he has just written another fantastic blog entry

Scheduling recurring workflows in CRM

On Richard Knudson’s blog he said that two of his most popular blog entries ever were based on creating a scheduled workflow in CRM 4.

So it was with interest when I saw the current blog entry on this subject and because there isn’t any scheduling tool within CRM but this is functionality that a lot of people would find useful.  This makes articles about scheduling interesting and useful to a lot of people working with CRM 2011.

Although below the instructions taken from the excellent blog post, he does attach some warnings and this is true because you have to be very careful about clogging up the ASYNC service because if you have ever experienced it going down you will know how important it is to CRM, if it shuts down or even slows down it’s a big problem.

WARNINGS:

  • Every time you create a recurring workflow, you should carefully consider what resource consumption implications it will have. Recurring operations tend to utilize a large amount of resources which can cause lagging to the CRM Asynchronous processing service.
  • You must select a primary entity for your workflow which will never be deleted, otherwise the entire recurring workflow will be cancelled. For example, you can set the primary entity of your workflow to be systemuser and trigger it the first time regarding your own system user.
  • There is a loop detection mechanism in CRM which would cancel processes/plugins that create infinite loops as the one above. The maximum depth for a recurrence/loop is 8; however, the depth is reset after 10 minutes of inactivity. Therefore, the workflow above should work fine because it has 1 month of inactivity so each time it executes the depth will be reset and it will never be cancelled by the loop detection mechanism.

1.  Define triggers:

Define the workflow as On-Demand and Child workflow (not automatic triggers)

2.  Define process:

Define the body of the workflow to represent the set of actions that must occur every month:

3.  Add the Wait:

Now you need a way to tell the workflow engine to repeat the process every month. To do so, I will first insert a wait step that will tell the workflow engine to wait for 1 month:

After the step, I need a way to “restart” the workflow. Since there are no while/for loops in the workflow designer, we must find another solution. I will simply create a recurrence pattern by having an “Execute child workflow” step which executes itself. Because the workflow is defined as a child workflow, it will call itself every month. After I activate the workflow it looks like this:

4.  Trigger the workflow once

The first time that the workflow executes, it must be triggered manually, after that it will schedule itself monthly from the time that it was executed manually. Since it is defined as an on-demand workflow, you can simply navigate to your primary entity and trigger the workflow manually.

5.  Verify

Once your workflow has been triggered for the first time, it should appear in the system jobs grid, waiting for the next month to resume execution:

Note that “month” is not the same as 30 days, it actually uses the calendar month definition, since CRM workflow uses the .NET DateTime class. Therefore, if it was first triggered the 1st of the month, it will always trigger the 1st of the month regardless of the number of days in a month.