The rise of Microsoft Dynamics CRM

human-evolution

If evolution really works, how come mothers only have two hands? Milton Berle

Microsoft Dynamics CRM has evolved at a frantic pace in the last 6 years I have been working with it.

The effort and development put into the product means it’s exciting to work with because Microsoft Dynamics CRM is constantly being improved, new features added, new companies purchased and add on’s created.

For people who use Microsoft Dynamics CRM to deliver customer projects it means you need to work hard to keep up

  • Understand how new features work, where and when they should be used
  • Create code correctly, so it can be upgraded
  • Learn new products Microsoft has purchased, ADXStudio, Parature, Field Services, Microsoft Dynamics Marketing, etc, etc.
  • Take Microsoft Dynamics CRM certifications for each version
  • Learn the differences between CRM online and CRM on-premise

I have blogged why it’s important to keep up to date before and the benefits

Should you keep up with releases and how?

Rapid rise

Microsoft had arrived to the CRM game late and launched CRM 1 in 2003 and stuttered along slowly.  The Microsoft Dynamics CRM wikipedia page notes CRM 3 was the first which saw reasonable uptake by customers.

I started working with Microsoft Dynamics CRM 4 released in 2007, which was a good place to start because the previous versions have been described as difficult to work with by colleagues.

Microsoft released a version of CRM Online and CRM 4 saw Microsoft pass 1 million users.

What I have enjoyed about working with Microsoft Dynamics CRM is the speed and breath of change in the product.  During CRM 2011 onwards Microsoft have developed the front end and back end of Microsoft Dynamics CRM at a frantic pace.  It makes working as a CRM professional challenging dealing with the new versions and changes, often leading to upgrades needed all customization to be rewritten.

Looking at the releases it struck me the speed of innovation and releases of Microsoft Dynamics CRM.

In 5 years Microsoft has released 4 new versions of CRM

  • CRM 2011
  • CRM 2013
  • CRM 2015
  • CRM 2016

Screen shots

Looking at the screenshot of CRM 4, makes me feel nostalgic and glad I don’t have to use CRM 4 anymore

CRM 4

Here is the sexy CRM 2015/2016

CRM 2016

CRM 2016 form

The head start Microsoft gave it’s CRM competitors has had moved from challenger in 2007 to leader in 2015.

The post from Leon Tribe on Gartner Trajectories of CRM solutions shows the gradual move from Microsoft Dynamics CRM.  The picture is taken from Leon Tribe’s post in June 2007 was a challenger and the Microsoft Dynamics CRM Online doesn’t even get a mention!

The Gartner Magic Quadrant shows Microsoft Dynamics having both its online and on premise versions in the leader category and recognized as winner in the CRM magazines Market Leader wards.  Microsoft kindly highlight these in their Analyst coverage page, below I have shown two

Gartner Magic Quadrant for the CRM Customer Engagement Center – read report

In recent years Microsoft has focused on improving the CRM online functionality and administrator tools to where the differences in on premise and cloud are negligible.

SalesForce

Microsoft started behind Salesforce but have been catching up the functionality with every release and now the product functionality is similar, it‘s difficult to say there is one clear winner.  The advantages Salesforce has over Microsoft Dynamics CRM is its large customer base, created due to its head start.

There are some good comparisons between Microsoft Dynamics CRM and Salesforce

Microsoft CRM Professionals view Salesforce as the main competitor to Microsoft Dynamics CRM, for tenders you are competing with Salesforce.  Microsoft made an unusual move in 2015 and partnered with Salesforce, causing confusion in the Microsoft Dynamics community.

I wrote a blog post – Why did Microsoft partner with Salesforce?

There were rumours Microsoft was trying to buy Salesforce

I can understand why Microsoft attempted to buy Salesforce

getting rid of the competition

stop wasting money competing agaisnt each other

Create shared services

Microsoft can create products/services to be used by both CRM services e.g. Azure services, Office products, PowerBI, etc.

It‘s the same tactics Resco used when buying CWR mobile CRM activities

Why Resco acquiring CWR’s mobile CRM is important

Microsoft CRM Online is growing

Microsoft is focusing on the Microsoft Dynamics CRM Online version and according this press release, Microsoft CRM is growing fast

Dynamics products and cloud services revenue grew 9% in constant currency with Dynamics CRM Online seat adds more than doubling year-over-year

Cloud solutions are growing in popularity with customers and CRM Online solutions are growing in complexity as developers understand the limitations of Microsoft Dynamics CRM Online and how do you work with them?

Solution architects are improving at designing cloud solutions and integrating with Mobile devices.

Conclusion

Microsoft Dynamics CRM has evolved as a product and the type of CRM projects are changing, there are lots more cloud solutions, mobile devices and portals.

In the future projects could involve machine learning, big data and integration with lots of devices and plugging into the Internet of things.  The social CRM functionality keeps growing in CRM.

With change comes opportunity but take advantage you must be prepared to learn new skills and approach CRM projects differently.

picture from thezoom 

Source control and Visual studio team services

Do the right thing. It will gratify some people and astonish the rest. Mark Twain

VSTS – Visual studio team services, previously known as Visual Studio Online

Developers have to use source control and system to manage bugs.  I have used lots of source control over the years

  • Visual Source Safe
  • CVS
  • GIT
  • Subversion

I have set up source control, versioned, branched and of cause suffered merge hell.  Source control features on The Frustrations of a CRM Developer.

Source control has saved my bacon many times.  I worked at one company which didn’t use source control, which was extremely scary.

Like most applications they get picked up and moved to the cloud and made into a service. Personally I’m beginning to prefer services because it takes the pain of hosting and maintaining a server and you don’t need to go through an IT team to fix problems.

Most developers refer to it as TFS, the team services has not caught on yet and is adding to the confusion at the moment.

When TFS/VSTS is done well its a benefit, a central location for work items and bugs, offering a way to log and maintain your work items. It’s used to create release documents (blog link), link work items with code and offer a history for bugs.

When TFS/VSTS is done badly is a curse, it slows things down and can be difficult to get developers to use.

Start as you mean to go on and get it right at the start of the project.

It takes effort but it‘s best to start a project or phase by putting all the user stories, solution backlog or work items into VSTS/TFS at the start.

  • it sets the standards for everyone
  • all development and work on requirements/bugs is captured, you have a history
  • burn down is done using graphs out of the box
  • once setup the effort to maintain is minimal

As a developer VSTS gives you a history of the effort in developing and for bugs it leaves an audit trail of effort.

It‘s always good to have information in central systems rather than people’s computers and heads because it allows work items/bugs to be picked up by other developers.

VSTS allows users to raise bugs directly and monitor progress, this self service functionality can save hours of keying information from emails and phone conversations.

One final great use of VSTS is to create release notes by exported fixed bugs from VSTS, which I blogged about below

CRM 2015 – Best practices for CRM Deployments 

One unusual aspect of VSTS is it charges you for building the solution by the minute.  I’m not sure about charging for builds, it doesn’t seem right

VSTS Training

Microsoft has good training resources for VSTS, a great overview and 3 hours of video training.

Overview with documentation

Video tutorial

 

How are you going to test the logic of your code

Simple systems are not feasible because they require infinite testing. Norman Ralph Augustine

Developers must be able to isolate and test their code easily and often in their own development environment.  If you don’t test your code you will let more bugs into production environments and this will cost you more time and effort in the long term.

Developers must be proud of their work, be craftsman and create quality code.  Poor quality code is a drop in standards which can spread to multiple developers like a virus – Bad code is like a virus, don’t get infected.  As a team/group you can choose to raise standards and get all members to raise their game or you can let standards drop.

Keep your standards high, your code quality and Never leave a CRM developer stranded

Questions

I get questions from Hsok CRM blog readers asking me to resolve problems they are having or asking for advice.  Below are two good examples

If I could offer some advice about asking questions

  1.  Be polite, say hello, how much you love my blog and then your question:-)
  2. Investigate the problem yourself first.  Google the problem, try things, ask your friends/colleagues and then if you still have problems ask the problem on the CRM forum
  3. Provide me (and the CRM forum) with as much information about the problem as possible e.g. CRM version, what you are doing and why, what you have tried, the results of your research.  More information = greater chance of someone/me helping you.

I received an email from Martin who had read my blog posts on unit testing with Microsoft Dynamics CRM

Martin was working on writing a webservice and found unit testing was a great way to test the logic of the code without having to deploy the code in the production environment which was tricky.

Isolate the logic of your code

Logic is the beginning of wisdom, not the end. Leonard Nimoy

 

Unit testing is about isolating and testing the logic of your code.  The main benefits of unit testing

  1.  You think about designing and structuring your code to make it easy to test the logic
  2. You and any developers can rerun your tests
  3. It’s easier to refactor the code because you can test it still works.
  4. Developers who unit test, think more about what they are testing

Thinking about what you are doing, questioning how you are designing the code and thinking about what the code is doing helps create better code.

First draft code works but is sloppy and complex with lots of dependencies.  First draft writing, you must edit your work to remove sloppy code and improve the overall code quality.

UNIT TESTING ALLOWS YOU TO EDIT CODE AND BE ABLE TO TEST THE CHANGES

If you haven’t got unit tests, you might break the code and not know about it, unless you test the code and all areas which uses the code.

How do you know the logic works

When a junior developer has written a plugin, web service or piece of code, I always want to know how they have tested the code works.

Before I started writing unit tests, I used to have a console application which connected to the development CRM environment and ran my plugin code.  I could do this because I wrote the plugin code as a separate piece of code which was passed a CRM connection and entity.

If you cannot run through the logic of the code on your own dev environment then you are making it difficult to test.  Difficult tasks are often not done by developers short on time.

Unit tests are the best way to test the code but a console app so you can step through the code is a good second.

 

Martin’s email about the

Use Case for Mocking WebServices

Hi Hosk,

Unit Testing is at first somehow abstract but we had some requirements to use a 3rd party WebService, where Mocking saved us a lot of time.

The WebService-Provided only allowed connection from whitelisted IP’s. Our customer only ordered the smallest Internet Package from his ISP.

Every 24 hours the customer had a new public IP. So we couldn’t get a connection form the cooperate network. Upgrading the ISP-Packing was also impossible.

The Webservice-Provided refused to add the whole ISP-Subnet. Our customer had already an Azure Cloud Service with a reserved (static) IP. So we decided to deploy our Code there.

Deploying and debugging is somewhat unhandy in this scenario. It take approximately 15 Minutes to deploy the Cloud Service and start Debugging.

I decided then to Mock the SOAP-Service so I could easily develop locally. This was a big time saver.

Maybe this Story helps other to understand what you can also address with Unit Tests/Mocking. Another possible Use Case for it is when you only have a production System and don’t wan’t to mess it up or when you must pay for every requets you submit to the 3rd Party WebService.

Lesson’s Learnt

If any other readers have stories about problems overcome or interesting solutions to problems please write to me at ben.hosking@gmail.com

Managing Microsoft Dynamics CRM 2016 online service updates

I like to go full bore into something. If you have a backup plan, then you’ve already admitted defeat. Henry Cavill

If you don’t manage backups they will manage you into a whole bunch of trouble

Microsoft Dynamics CRM Online delivers two service updates a year, you can delay but you have to update your Microsoft Dynamics CRM online once a year.  One service update is mandatory.  You can delay a CRM online service update but you cannot hide from it.

When Microsoft Dynamics CRM Online was first released I wondered what Microsoft Dynamics CRM online subscribers did before sandbox instances, how did they test the service updates for their Microsoft Dynamics CRM online.  If you consider the on premise version of CRM is often 6 months behind you need a Microsoft Dynamics CRM online to test the new functionality.

There are two key questions you need to ask

  1. How do I test my Microsoft Dynamics CRM Online?
  2. How do I develop for Microsoft Dynamics CRM Online?

 

Microsoft Dynamics CRM Online update facts

  • There are 2 service updates a year.
  • You will receive an email with the schedule update date.
  • You can reschedule the update to a date and time to suit you.
  • Your Microsoft Dynamics CRM online instance will not be updated unless you approve it.
  • You can choose to not apply an update.  The next update becomes mandatory, meaning you have to apply the minimum of one update per year.
  • Best practice (says Microsoft) is to run the latest version of Microsoft Dynamics CRM Online
  • Best practice (says Hosk) is to delay updating your version of Microsoft Dynamics CRM online for 1 or 2 months, to allow any nasty bugs to be fixed by Microsoft.  I discuss something similar in this blog – Should you keep up with Microsoft Dynamics CRM release cycle?

Best approach to updating CRM online

Make sure Microsoft Dynamics CRM online updates don’t break none of your customizations by testing the whole system.

Microsoft has made this process easier by introducing sandbox instances, which allows you to create an environment copy of production on a non production (sandbox) instance.

Microsoft added sandbox instances, you get one free if you 25 enterprise users or they cost £90ish plus data costs a month.

Learn about Microsoft Dynamics Sandbox instances here with a good technet article

You can apply the Microsoft Dynamics CRM online service update to the sandbox instance and test your customisations, if it works without problems you can schedule the service update to the Microsoft Dynamics CRM online production instance.

Microsoft created a great technet article – Manage Microsoft Dynamics CRM Online instances

It has two scenarios on updating Microsoft Dynamics CRM online.

Be Prepared

Be Prepared… the meaning of the motto is that a scout must prepare himself by previous thinking out and practicing how to act on any accident or emergency so that he is never taken by surprise. Robert Baden-Powell

I wrote Why you should write code and customizations like a boy scout and you must be prepared to manage your service updates.

You must be prepared in advance when the service update is available, what’s in the service update and how you will test your CRM instance.

The customer needs to be ready to test the customisations and sign off the update has not effected your customisations.

You can delay one service update but this will put more pressure on the next one, you must ensure there are resources and time to test the update.

Don’t let a service update sneak up on you and don’t underestimate the effort needed to test all the customisations

The customer will need to have some resources ready and be in a position to sign off so you can schedule the service update to your product CRM Online environment….Time is ticking.

Microsoft Dynamics CRM Online service update waits for no one.  The customer needs to be made aware of the process, cost and time constraints.

  • Time – One service update is mandatory per year.
  • Cost – Cost of a sandbox environment.
  • Effort – You will need a CRM admin to create the sandbox instance.  Resources will be needed to test the customisation, you will need a test plan.
  • Sign off – Someone needs to sign off the sandbox environment
  • Schedule – Schedule the production service update

Practice

The practical usually turns out to be different from the theory.  Make sure you are comfortable with creating and configuring sandbox instances.

Know where to look for service updates and how to schedule them.

Production deployments are not difficult but it’s important they are done right

CRM developers tools of the trade – ReSharper

Do not wait; the time will never be ‘just right.’ Start where you stand, and work with whatever tools you may have at your command, and better tools will be found as you go along.

George Herbert

CRM Tools

Tools play an important part of the CRM developers life, they can save you hours of time and speed up development.  One of the best examples of a tool saving you time and effort is CRM MVP’s Scott Durow’s Ribbon workbench.  The manual process of editing the Ribbon in CRM is incredible tedious, the Ribbon workbench offers a GUI way to do it and it’s free.

Tools allow you to code on the shoulders of great CRM developers

You should checkout Tanguy’s XrmToolBox

I have reviewed a number of tools on this blogpost – Hosk’s CRM 2013 Tools List

Tools

CRM tools are very useful but there are some generic tools which are useful to CRM developers and one I would highly recommend is ReSharper by JetBrains.

ReSharper is a Visual Studio extension for .Net developers.  I have heard a few developers talk about ReSharper, so I thought I would have a look myself.  What you usually find is anyone who has used ReSharper will tell you how good it is.

The downside is this tool isn’t free but it doesn’t cost that much, find the price for personal use here

It is free for various people/groups which you might be part of

Additional options
* For startups (50 percent off)
* For students and teachers
* For education and training
* For Open Source projects
* For .NET user groups
* For Microsoft MVPs

For a personal license it’s 99 pounds.   Which if you use this a few times a week isn’t that much and the benefits to your coding and time spent finding bugs, formatting and other tasks could easily be worth it.  They also have a pay monthly option

ReSharper has a try before you buy scheme
The good news is you can try ReSharper free for the 30 days, so download it and give it a go.
I have tried it and I love it, to get the full benefits you will need to be writing CRM plugins and/or .NET code.
These blog posts highlight the benefits of ReSharper

Lots of features

ReSharper has lots of functionality, one of the difficulties I had was to learn what features were available, what they did and when I should use them.

These blogs were useful in learning about the ReSharper functionality

Warnings not nagging

I appreciate the way ReSharper works because it uses warnings.  These are often best practices but not serious.

It pops a warning mark on the right of the code and if you click on it you will get to a light-bulb.

Often I take these as suggestions, sometimes I do, sometimes I don’t. The way ReSharper warns you I have found not to be annoying or nagging.

Keeps me thinking

One of the positives of Resharper is keeps offering me code assistance and constantly keeps me thinking about the quality of code I’m writing.

  • It has offered to change a query expression to a linq query
  • swap If Else statements to a switch
  • Catching the nulls
  • One great features of Resharper is it warns you if a variable may contain null and offers to add an if statement to catch it.

Correct Naming standards

ReSharper is good for nudging you in the direction of better coding and will warn you to rename fields and functions

  • Lightbulbs – quick fixes
  • closing brackets and quotes automatically
  • Code Generation
  • Alt – INS

RED Errors whilst you type

“Big deal,” you may say. “Visual Studio already has squiggles like that.” True. But Visual Studio only shows the squiggles after you compile. ReSharper points out compiler errors in real-time, as you type. It does its magic completely in the background.

Grey is dead code

If you see grey code, it means you don’t need this code because it’s not being used.  Sometimes this is annoying because you are about to use it.  It’s good for getting rid namespaces you don’t need (ReSharper will get rid of them for you)

One feature I really like is when ReSharper puts up an error, there is an option to click which says

Why is ReSharper suggesting this and it will explain the coding practice to you

Auto Closing Delimiter

ReSharper automatically closes brackets

Not used warning

ReSharper has great features and one of them is to warn when variables are not used

I had an example where I was assigning a value and then overwriting it.  Resharper warned me that variable value wasn’t being used in any code branch

warnings I found annoying

VAR

One warning which annoyed me was Resharper trying to change all varibables to var to improve readability.  Personally I like developers to use the correct variable type and using var is a bit lazy.

it kept trying to persuade me to remove this but FXcop kept advising me to put this in.  Only one way to resolve this

FIGHHHTTT

The good news is it’s easy to turn off the warnings.  You can turn off the warnings in a method or class or project.

Or you can turn the inspect severity and then search for the error you want to remove.

Learn to use your tools effectively

Tools can make speed up development process and make development processes easier. Choosing the right tools is one part of the solution.  The rationale behind this is you probably use your development tools on a daily basis, if you can find functionality which speeds up, automatics tasks you do every day, lots of times a day you will make a considerable time saving.

This sums up my thoughts on resharper, it eases and speeds up my development

information for learning ReSharper

There is a series of screencasts on the Dime Casts website which are quite good as an introduction.There is also the 31 days of Resharper and the official demos give you an idea of what’s possible so you know to dive into the menu.
This article show you how ReSharper’s code creation

Absence makes the heart grow fonder

The time I really notice the work ReSharper does is when I am helping with someone and they don’t have ReSharper.

ReSharper helps refactoring, this article describes why – Why use ReSharper manage refactor code

Overall

ReSharper makes working easier and smoother with lots of great enhancements.

Warning me about unusual variables, methods and usings is useful.

Warnings about code which could be done better is useful

It’s difficult to describe what exactly ReSharper does but it does things better than Visual Studios’s out the box functionality and will make your life easier.  If you use Visual Studio on a daily basis all the small benefits will add up to large benefits.

If you try ReSharper you will see why it’s great and will be tempted to buy it

Questions on Microsoft Dynamics CRM solutions and environments

The art and science of asking questions is the source of all knowledge.

Thomas Berger

I was asked some questions about solutions in Microsoft Dynamics CRM, I decided to answer using a blog post so other CRM developers could benefit.  If one person is asking the question there are probably many more people thinking it.

Posting the answer to a question on my blog means other people who are having the same problem can find the answer.

Solutions

Understanding solutions is a something a CRM developer must master,  getting it wrong can cause problems deploying and managing your customizations.

The blogs below will give you a good understanding of Solutions, how they work and many of the common problems you experience with solutions (usually managed solutions)

Here are the questions

Q.  All changes made to any (unmanaged) solution are applied to the default solution.

A.  All changes to an unmanaged solution are applied to the default solutio,  you can’t undo the changes except by importing an older unmanaged solution, which is like rolling back those customizations.

Importing an unmanaged solution will overwrite any of the customizations included in the unmanaged solution (assuming the system only includes unmanaged solutions)

Q.  Multiple developers are able to work in parallel on the same entities as all changes are applied to the default solution. Everyone has sight of all changes at all times.

A.  If you are working on the same CRM environment, changes  will be visible instantly to all developers but only published changes will be visible to customers.

  • Fields, views, new entities will be visible instantly
  • Form changes will be visible when the developer publishes the solution

Code changes are different due to the way CRM developers work e.g. CRM developers tend to download a copy of the code (Javascript or plugin) work on the code and then upload when ready.

Developers usually get the latest code from TFS or the source control used in the project rather than getting the latest code Javascript from the CRM form.  This process can result in developers overwriting changes if they are both working on the same Javascript or plugin at the same time because they work offline whilst coding.  You can work around this by setting up processes and source control is your friend.

This blog post discuses multiple developers working on web resources

How do multiple developers work on a web resource within the CRM environment

Q.  Removing the unmanaged solution does not remove the changes in the default solution – these have to be removed manually (or the default solution can be restored (snapshot tools like Cobalt look good and free? Can they be used to perform a rollback in Dynamics online?)

A unmanaged solution is a wrapper to move your customization’s between CRM environments.  When imported it imports those changes into the default solution, overwriting any existing changes.  Deleting the unmanaged solution will delete the solution but not delete the customizations.

Managed solutions can be thought of as read only to the customer.  You cannot modify any of the managed components (unless they are the default CRM fields).  Deleting a managed solution will delete the customizations and the data.

To remove unmanaged customizations you must delete them manually.  Solutions are additive which means they don’t remove customizations.  You can use unmanaged solutions to change the customizations back to previous state.

I haven’t used Dynamics CRM Snapshot from Cobalt but looking at the page it seems to snapshot the data not the solution and customizations

You can create snapshots of your customizations by keeping the solution files so you can import them to roll them back.  Remember to use version numbers otherwise it’s difficult to manage and keep track of the CRM solutions, particularly if you have to move the solutions through multiple CRM environments.

Version numbers are mentioned in the blog post CRM 2015 – Best practices for CRM Deployments

Q.  Managed solutions are essentially a container for any changes you want to move to a new environment. Care must be taken to ensure that all of the relevant changes to entities are pulled into a release. It will become clear when the solution enters UAT if dependencies have been missed.

I have written about Managed solutions CRM 2013 – Managed solution problems with out of sync solutions.   Only a solution from the same publisher can update the customizations in a managed solution

Why use managed solutions

Choosing your solution strategy is an important because it can be difficult to swap back from a managed solution to an unmanaged solution.  There is anxiety before you make the decision and push the button and import a managed solution.

There are many choices you have to make in CRM which are very hard to undo like

CRM Entity ownership – How do you decide?

I have talked to CRM developers who hate managed solutions and only deploy unmanaged solutions. I have been asked numerous times why anyone would use a managed solution, so lets investigate the reasons.

The logic behind a managed solution is two fold

  1. Managed solutions are read only to protect the customization creator from users and CRM developers taking and changing the customizations
  2. Stopping users from changing the customizations which could result in the customizations not working or working incorrectly.

Managed solutions are great for CRM resellers who created a solution for CRM which acts like a products.  E.g. an Autonumber solution.  They can sell the Autonumber solution, it’s gets deployed and the users can’t change any of the code to stop it working and other CRM developers can look at the code to steal the code/ideas.

This scenario is ideal for managed solutions because if the users change their mind and don’t want to use the solution they can uninstall it and it removes all traces of the solution and its data.

Q.  If managed solutions are removed from an environment any data would be removed as well – so we should NEVER remove a managed solution but instead apply a new managed solution on top.

When you remove a managed solution it removes everything

  • Customizations
  • Data

Once the data is gone you can’t get that back, which is why you need to think carefully if using managed solutions are the right choice.

I know many CRM developers who refuse to use managed solutions due to

  • Build problems
  • unable to edit production/live system without importing a new solution
  • Solution dependencies

Unmanaged solutions will give you an easier life but it will potentially let end user modify live customizations which could break the solution and with no easy way to know what had been changed.

CRM 2016 has added patched solutions

Solution patching allows you to release smaller solutions, creating smaller solutions and reducing conflicts and problems when deploying the patch solution.

I haven’t used patch solutions so I don’t know if the theory works in practice.

Q.  Environments setup question

Dev – unmanaged default solution with project related solutions.
UAT – Test environment that managed solutions are deployed into.
Live – managed solutions transition to prod when successfully passed UAT.

There is no right answer for the number of environments, it depends on the development and testing schedules you are doing, how you work with the customer.

The number of environments can reflect the different phases of a project,  you can often have testing and development phases running at the same time.

Ask yourself what is the purpose of each environment.

I would add a preproduction environment, an environment which is hosted on the customers site or a sandbox instance if using Microsoft Dynamics CRM online.  This environment has exactly the same customizations and similar data to the production environment.  It allows the customer to test near production environment and is useful for investigating live issues.

For on premise development it’s common to have a development environment and internal QA/UAT environment for non developers to test fixes.  Developers are terrible at testing their own fixes

The usually test as CRM Admin role – The System Administrator role is a benefit and a curse to CRM developers

They often only test the happy path –Don’t just test the happy path

Development environments have development data – How to create realistic Test Data for your CRM Project and why you should

Here is some final reading on CRM environments for you – The pain of setting up CRM Dev environments

Never leave a CRM developer stranded

 

What lies behind us and what lies ahead of us are tiny matters compared to what lives within us.

Henry David Thoreau

 

Developers are a community which spans projects, developers jump in and out of different projects for varying times.  Any code or customizations are developer creates might be maintained by himself or another developer, it‘s important to do a good job to make it easy for yourself and others.

When developers in a company work well as a group, they push each other to keep high standards.  Keep high standards takes pride and enthusiasm because it‘s harder to write simple code than complex code.  When one developer drops their standards, this can infect a whole project, Bad code is like a virus, don’t get infected.

Microsoft Dynamics CRM developers need to work as a group because CRM has lots of pockets of specialisation and impossible for one developer to know the functionality and limitations of all aspects of CRM.  The knowledge of the group of developers can give guidance to developers without knowledge of parts of CRM.

Today I say act like a soldier, in an earlier blog I told you to write code like a boy scout, what will future blogs bring

A Team of individuals

One day a call came into the support desk with an urgent bug on a Microsoft Dynamics CRM project I had not worked on, I had to investigate the bug.

The developers who worked on the project, either left the company or was unavailable.  I read the project documentation, it was outdated and didn’t help.  I looked at the development environment and started my investigation with the code and CRM.

The code wasbig ball of mud, rolled in a plate of spaghetti with technical debt on the side.  This was legacy code with no one to help me, it would be a long day, my fellow CRM developers had left me stranded.

I poked and prodded the code, toyed with the CRM, asked questions, documented my investigation and was 90 percent sure I had found the bug but it‘s scary changing legacy code with no unit tests.

Legacy code evolves to incorporate lots of fixes to particular problems or processes, when viewing the code for the first time often the code doesn’t seem logical unless you understand the business logic.  

Don’t let you fellow CRM developers down struggling with poor code I had written.  When you take shortcuts, don’t document code and write.

Code echoes

Creating code is like creating a baby, the creation is fast and fun but you have to look after the code for years.  

Once the code is written it will be read, maintained, extended, debugged for years.  Complex code will make take up more time, sometimes a small bug fix or code change can take days to do.  Coding faster will slow you down later, particuarly first draft code which has not been refactored.

The code you create today is likely to be used and maintained for years.  Make sure quality is high so the pain of maintaining it is low.   Working with legacy code, finding bugs can take hours/days and thought process of.  My usual approach to legacy code is

If the legacy code ain’t broke, don’t touch it and slowly back away.

Poor quality code will leave developers maintaining that code stranded and struggling with the code and time taken to get it right.

Starship developer

The best things in life are beyond money; their price is agony and sweat and devotion ― Robert A. HeinleinStarship Troopers

Reading Robert A. Heinlein Starship Troopers , in the story it follows one recruits journey in the mobile infrantry.  The mobile infrantry are volunteers, their actions are motivated only by their willingness to be in the mobile infranty and they can leave at any point.

Self motivation is the strongest form of persuasion and motivation.  This theme was discussed In the book  Leading by Sir Alex Ferguson (Author), Sir Michael Moritz (Author) gives insights into management style of Alex Ferguson and motivated to write Leadership

I like to bring the thoughts and opinions from different areas to CRM development to see if there are similarities and differences.  CRM developers are a community who share and help each other and sometimes contribute to the frustrations of a CRM developers The Frustrations of a CRM Developer

  • CRM developers are volunteers, they have chosen to be a CRM developer
  • CRM developers should be proud to be a CRM developer
  • CRM developers can change jobs at any time if they don’t like it
  • CRM developers are part of a team
  • CRM developers are part of the Microsoft Dynamics community

I have nothing to offer but code, customizations, sweat, solutions, tears, documentation and unit tests and blood to offer – Hosk

CRM developers are soldiers, battling bugs, deploying troops, creating customizations to take down customer requirements and keeping our heads down when the flack is flying.

Never leave a man down

The chances of CRM developers dying for the cause are remote, there have been a few close calls but I got away with a few broken bones and nightmares (which mainly consist of having to support CRM 4 projects and SSRS report formatting)

The soldiers creed – I will never leave a fallen comrade.

I saw this in the film Black Hawk down, where a helicopter crashes and is surrounded.  Some troops drive in to rescue them and get stuck themselves.  They fight their way back to base.  They realize not everyone made it back and most of them go back and rescue their comrades.

Why is it important because if you were the man left behind you would hope your buddies would come back to rescue you, it gives that Soldier hope.

The American soldiers have the Soldier’s Creed (US version)

I am an American Soldier.
I am a Warrior and a member of a team.
I serve the people of the United States, and live the Army Values.
I will always place the mission first.
I will never accept defeat.
I will never quit.
I will never leave a fallen comrade.
I am disciplined, physically and mentally tough, trained and proficient in my warrior tasks and drills.
I always maintain my arms, my equipment and myself.
I am an expert and I am a professional.
I stand ready to deploy, engage, and destroy the enemies of the United States of America, in close combat.
I am a guardian of freedom and the American way of life.
I am an American Soldier.

I adapted it, similar to updating the quote from full metal Jacket Why CRM Developers should always start with the CRM SDK 

CRM Developers creed (Hosk Version)

I am a CRM Developer.
I am a coder and a member of a team.
I serve the people of the Dynamics CRM Community.
I will always place the project first.
I will never accept defeat.
I will never quit.
I will never leave a fallen comrade.
I am disciplined, physically and mentally tough, trained and proficient in my code tasks and skills.
I always maintain my code, my computer and myself.
I am an expert and I am a professional.
I stand ready to deploy solutions, engage customers, and destroy the bugs in the code.
I am a guardian of freedom and the Leisurely way of life.
I am a CRM Developer.

Here is an interesting article on the subject Leave no soldier behind – no exceptions

Don’t leave a CRM developer stranded

Leave no man down.  You are part of a team, you might not see or talk to your team mates everyday but you are a group and you must work together

Ways to leave your fellow CRM developer stranded

  • hard to read code
  • poor quality
  • lazy bugs
  • no comments
  • poorly labeled code
  • first draft code/no refactoring
  • no documentation

CRM developers are a team, your code/customizations will be used by your fellow developers, don’t let them down with first draft code

  • Have pride in your work
  • Skilled expert
  • Enjoy working with your team mates
  • If everyone keeps a high standard it works
  • Soldiers are highly trained and have pride in their abilities.
  • Soldiers have faith in fellow soldiers

When someone is out of the office and they call you for help, help them I will never leave a fallen comrade.  Stop what you are doing and bust a gut to find the answer because if you were out on site you would help the team would help you.

Final thoughts

Individual commitment to a group effort – that is what makes a team work, a company work, a society work, a civilization work. Vince Lombardi

To deliver projects successfully it takes a team effort, with many individuals working together.  Strength of a team of CRM developers comes from each individual working together.

CRM developers might not always work in the same team on the same project by CRM developers team is beyond projects.  The code and customizations you create will be used and maintained beyond the life of delivering the project.  Code and customizations expand beyond their project and unite CRM developers together.  Create code and customizations you are proud of and will be easy for your follow CRM developers to maintain and extend.

Don’t leave a CRM developer stranded.

“Alone we can do so little, together we can do so much.” Helen Keller

 

This post is my personal opinions and not the views or opinions of my employer:-)