The CRM SDK is the main tool for a CRM developer, the better a CRM developer knows its capabilities, limitations and documentation the more efficiently they can do their job.
CRM developers should always start with the CRM SDK, it contains all the functionality needed to work with CRM, yet many developers rarely look in the CRM SDK documentation for clarification/help usually turn to the internet to search for examples and code. Retrieving code examples results in a missed opportunity to learn about the CRM SDK.
What is the CRM SDK?
There is the actual CRM SDK, which you download Microsoft Dynamics CRM Software Development Kit (SDK) for CRM Online and on-premises CRM 2015 This gives you a bunch folders and files with sample code and the all important CRM dll’s and maybe a link to the CRM developer toolkit as long as you haven’t downloaded CRM 2015 (Where is the CRM Developer toolkit for CRM 2015?)
When I mention the CRM SDK, I am talking about primarily about documentation which describes the functionality contained in CRM dll’s. In the download it’s the CrmSdk2015.chm, I use the online documentation because it’s easier to search.
Software Development Kit for Microsoft Dynamics CRM The CRM SDK documentation is awesome but I distinctly remember finding it difficult to use when I was learning CRM development.
I talk more about the CRM SDK in this blog post and it’s a good place to start learning about it
This is my CRM SDK
In the film Full Metal Jacket Gunnery Sergeant Hartman tells the recruits to give their rifles a name because it’s their best friend and could save their life (he actually says give the rifles a ladies name because they won’t be getting their hands on any ladies for a long time).
CRM developers should view the CRM SDK as their development rifle. It’s your best friend and your main tool in CRM development and it will save you development life on numerous occasions with the it’s functionality and features.
Gunnery Sergeant Hartman: Pray!
Recruits: [chanting] This is my rifle. There are many others like it, but this one is mine. My rifle is my best friend. It is my life. I must master it as I must master my life. Without me, my rifle is useless. Without my rifle, I am useless. I must fire my rifle true. I must shoot straighter than my enemy, who is trying to kill me. I must shoot him before he shoots me. I will. Before God I swear this creed: my rifle and myself are defenders of my country, we are the masters of our enemy, we are the saviors of my life. So be it, until there is no enemy, but peace. Amen.
Most CRM developers aren’t allowed guns at work because in times of frustration it would be too tempting to shoot their computer but each CRM developer will have his own copy of the CRM SDK (for each version of CRM). I have adapted the quote to make it more suitable for CRM development
CRM developers: [chanting]
This is my CRM SDK. There are many others like it, but this one is mine. My CRM SDK is my best friend. It is my life. I must master it as I must master my life. Without me, my CRM SDK is useless. Without my CRM SDK , I am useless. I must development with my CRM SDK true. I will.
Before Hosk I swear this creed: my CRM SDK and myself are defenders of my CRM Solution, we are the masters of the CRM Solution, we are the saviours the CRM Solution. So be it, until there is are no bugs, but peace in CRM dev land. Amen.
CRM Development is like a jigsaw puzzle
I view CRM development as a jigsaw puzzle, like a jigsaw puzzle CRM development contains many different but connected pieces.
Learning and understanding the different pieces often helps see how the other pieces of the jigsaw fit together.
A couple of examples could be
- Learning about plugin architecture can help understand how workflows, real time workflows work and why plugins are quicker.
Learning new skills is a mix of theoretical (reading, videos, etc) and practical (doing). There is a different between theoretical knowledge and practical knowledge, which occurs when you try to get the sample code to run and have to fix many small problems before it works. Whilst fixing these problems you learn how things really work.
Theoretical knowledge without practical experience has a limited value because until you write some code or create a customization you can’t be really sure you know how to do it.
Practical knowledge without theoretical knowledge is more useful but this can be a slow way to learn, involving making lots of mistakes and learning best practices through action. Problems and errors can be harder to diagnose and fix if you lack the theoretical knowledge and understanding of how the CRM SDK works.
The above section is the long way of saying CRM developers should read the CRM SDK documentation.
CRM developers and the CRM SDK
The CRM SDK is the supported/safe way to interact with the Microsoft Dynamics CRM database. Just like an annoying family member you are stuck with it and every day you come to work you are going to have to work with CRM SDK.
The CRM SDK can be stubborn, difficult and renowned for not suffering fools gladly
The CRM SDK is a cruel mistress to those who do not show it respect but if you play nicely, tickle CRM SDK’s belly it will deliver untold development riches
One of my common quotes regarding CRM development is
Always start with the CRM SDK
You cannot work around the CRM SDK
My advice to CRM developers who are thinking about creating unsupported CRM customizations is don’t even think about it.
If you put unsupported CRM customizations into your CRM solution Microsoft will not support your CRM Solution.
Do you want to the person who has to inform the customer you cannot get support for a CRM problem (which could be a bug in Microsoft Dynamics CRM) because you wrote an unsupported CRM customization.
There are other reasons why you should put unsupported customizations in
- Upgrading CRM will be harder
- Unsupported customizations could stop working with any rollup or patch
- Microsoft won’t support the CRM Solution
Read more reasons Why you shouldn’t put unsupported customizations in Microsoft Dynamics CRM
How some CRM developers work
Most developers when faced with a task they are not sure about will look for some sample code to use. The common places to get some code are
- Internet search
- Hosk’s Dynamic CRM Blog
- Existing code
- Ask a question on the CRM forums
- Ask a fellow developer how to do it
- Look at the SDK
Most developers view development
Learning through experience is a valid way to learn but it can be a slow way to learn, where the developer has to make all the mistakes themselves and remember to learn from them. Reading the CRM SDK will help you understand how CRM customizations work and avoid some of the errors/mistakes.
The CRM SDK documentation contains the limitations of functionality, it’s vital to know the limitations of the functionality to avoid it causing problems when you find out later a certain piece of functionality can’t be used.
- Plugins have a 2 minute time out, if you have some long running C# code then this needs to be done as a custom workflow.
- Rollup fields cannot reference other rollup fields.
- Workflows are Asynchronous, if you need the customization to run synchronously you need a real time workflow or a plugin.
Strive to understand how CRM SDK works
I encourage CRM developers to always start with the CRM SDK and to see what functionality is available and to increase your understanding of how the CRM SDK works.
Getting code examples is great but it bypasses the learning involved in creating the code yourself.
All craftsman should know their tools, a CRM developers main tool is the CRM SDK. CRM developers should know the CRM SDK forwards, backwards, upwards, downwards and inside out. A CRM Developer should know the CRM SDK better than members of his family
You can view the CRM SDK as a family member
- It’s troublesome
- Can be extremely annoying at times
- CRM SDK can bring you great joy
- You have no option (supported option) but to get on with it
- It’s constantly changing and evolving
- It can be difficult to understand what it’s saying (confusing error messages!)
- You love it
Why should you learn how the CRM SDK works
The better you understand the CRM SDK and the CRM platform the more in depth your understanding will be of the different customizations available for CRM developers.
Error messages don’t tell you the problem but often point you in the right direction. If you have studied the CRM SDK this will make sense, if you haven’t error messages can be extremely confusing.
In my blog post CRM 2015 – How to diagnose plugin errors it details plugin errors and how CRM SDK knowledge helps when things go wrong
Why you should read the CRM SDK what’s new
The CRM SDK has detailed sections on the new functionality for CRM developers and what functionality has been depreciated.
This article explains why you should read the what’s new
CRM 2015 SDK – Why you should read the What’s new for developers
here is my blog on the new functionality in CRM 2015 SP1
What’s new in CRM 2015 SP1 for developers, customizers and admins
In 2014 I managed to persuade/pester many of the CRM MVP’s to fill in a Q&A which you can read here
One common trait in CRM MVP’s is they have a detailed knowledge of CRM and the CRM SDK and this knowledge comes through in their in depth blog posts.
My aim each day is to know more about CRM development when I leave work than when I started it.