Hosk’s Top CRM Articles of the week – 12th June

Article of the Week

The article of the week is my article is the excellent and I want as many people as possible to go and have a look at his first steps in towards creating a developer toolkit replacement.

Possible developer toolkit replacement

I will add my blogs on the subject below

Where is the CRM Developer toolkit for CRM 2015?

CRM Developer Toolkit Alternatives

I will add the Connect suggestion here has 66 votes which is great because a week ago it had 9.

Best of the Rest

XRM code snippets

Some useful Javascript code snippets

CRM 2013 – Disabling a subgrid

Hosk article on how to disable a subgrid without actually disabling it.

Web API preview documentation released

The new Web API stuff, in an odd trial but unsupported offering!!!?!?

New XrmToolBox Plugin: Export to Excel

Don’t be limited by excel when exporting records with the

Getting the CRM Developer toolkit working with Visual Studio 2013

Steps on how to get the current CRM developer toolkit working with visual studio 2013

Upgrade vs Rebuild, Interest vs Responsibility

Good article from CRM MVP Leon Tribe on considering what to do with your customizations when upgrading

Turbo Forms: Get your JavaScript ready for CRM2015 Update 1

Scott Durow gives the lowdown on getting your scripts into shape to be able to use them with the new CRM 2015 SP1 turbo forms.

Create Button in CRM 2013/2015 Form without a Field using Javascript

A button without a field, what is this magic

Dynamics CRM – Security Role Automatically Assigned to imported Teams

Cheeky salesperson role automatically assigned on importing teams.  Probably some kind of reason for this but very annoying if you are not aware of this behaviour

Improve CRM query performance using compatibility version 120 with SQL 2014

Dramatic performance improvement when switching to SQL 2014

Scalability considerations for CRM / SharePoint integration

good article and worth a read

C# Development Tips for Microsoft Dynamics CRM

Great article on implementing C# dev to CRM

Kinect and CRM!!

It’s madness I tell you but it looks cool

PROGRAMMING

“How is Software Like a Skyscraper?”

Martin Fowler – Is Design Dead

great article on YAGNI by Martin Fowler

very interesting article on the history of lean development, I don’t know much about lean development but it sounds like agile without the rubbish bits

http://www.leanessays.com/2015/06/lean-software-development-history.html

Empires fall: Decentralize your code to avoid total collapse

The 8 Best Programming Books to Read Right Now if You Want to Distinguish Yourself

Software engineers are lazy bastards

31 Of The Best Kept Secrets Of Great Programmers

Microsoft: People Have Smaller Attention Span Than A Goldfish

Improving Your Craft with Static Analysis

What’s Fixie and Why Should C# Programmers Care?

TypeScript Futures

OO principles from Head First Design Pattern

The dangers of spaghetti code

OTHER

DESIGN THINKING… WHAT IS THAT?

Do something syndrome

The Disease of Being Busy

Neil Gaimen and Kazuo Ishiguro

Deep Habits: Spend Six Months to Master Skills

Strategy More: Inc. Success Bill Gates Warren Buffett
How Bill Gates, Warren Buffett, and 8 other successful people spent their summer vacations when they were younger

Previous top picks

https://crmbusiness.wordpress.com/2015/06/02/hosks-top-crm-articles-of-the-week-2nd-june/

Useful Hosk Links

Hosk list Of CRM 2013 Tools

A list and review of CRM 2013 tools, this will probably work in CRM 2015 as well

Hosk’s CRM Developer Articles

A collection of my favourite CRM Developer articles I have written

MB2-703 – CRM 2013 Customization and Configuration Certification Information

All the CRM 2013 content to help you pass the exam

HoskWisdom – Hosk Developer Quotes

 Words of Wisdom from the Hosk.  I have written over 900 articles, surely I should have said a few memorable things

Advertisement

CRM Developer Toolkit Alternatives

I was glad to see my blog post Where is the developer toolkit for CRM 2015

getting some retweets and very please to see the Connect suggestion now has 51 votes

Dynamics CRM Developer Toolkit for CRM 2015/Visual Studio 2013

please keep voting and hopefully someone from Microsoft will reply.

Silence

It seems crazy the current CRM developer toolkit doesn’t work with Visual studio 2013, it’s over 2 years old with visual studio 2015 coming soon!!

What I find most puzzling is the complete lack of information about when/if there is going to be a new version of the Developer toolkit.

  • If Microsoft are making a new sexier CRM Developer toolkit, tell the CRM community
  • If Microsoft are not going to update the CRM developer toolkit, tell the CRM community so CRM developers can start to think of alternatives.

Microsoft has no obligation to update the CRM developer toolkit and it’s worth remember this was/is a tool they gave to the CRM community free of charge.

The lack of update to CRM Developer toolkit for Visual studio 2013/2015 and no version for CRM 2015 SDK is starting to get to a critical juncture. There will be more and more CRM Developers facing problems.

The problem will be most significant to new CRM developers will find the lack of support for the CRM developer toolkit most confusing.  When Developers struggle to start developing with a tool/software they can easily give it.

Setting up CRM Dev toolkit with Visual Studio 2013

I managed to get the CRM Dev toolkit working with visual studio 2013 and you can read more about it in the blog post below

Getting the CRM Developer toolkit working with Visual Studio 2013

Replacement for CRM Developer toolkit

Jason Lattimer has created some interest templates and with a bit more work could crate a CRM Developer toolkit replacement.

Jason is looking for some feedback on his current work, so please click the link below and give him your thoughts and opinions on his current work and potential features you would like to see.

Possible Developer Toolkit Replacement?

What are the CRM Developer toolkit alternatives?

With Microsoft being ominously silent about the CRM Developer toolkit and with increasing numbers of CRM developers running into compatibility problems, it got me thinking about the alternatives.

Below I list some of the alternatives to using the CRM Developer toolkit, I have three questions

  • Is it available now?
  • Pro’s
  • Con’s

Handcrafting – DIY

Do it yourself, old school style of creating plugins and deploying them using the plugin registration tool.

It isn’t difficult to create plugins/custom workflows, you just need to read the CRM SDK Write a plug-in, extend the IPlugin interface and then deploy the DLL using the plugin registration tool.

Is it available now?

Yes and always will be

Pro’s

It will definitely work and you will have no problems with compatibility.  This is how plugins use to be written in CRM 4 and CRM 2011 before Microsoft created the CRM Developer Toolkit.

Writing plugins this way is usually done using some template plugin code (much like the Plugin class in the CRM Developer Toolkit).

Con’s

It will be slower and probably involve making some templates.  This choice would involve lots of extra framework type of work rather than development.

Hacking CRM Developer toolkit

You can hack the current CRM developer toolkit to get it working with Visual studio 2013 and working with CRM 2015.

blog to get CRM Developer toolkit working with CRM 2015

Getting CRM developer toolkit working with visual studio 2013

Is it available now?

Yes, as long as you have a few hours and a lot of patience you should be able to get the CRM developer toolkit working with CRM 2015 and/or Visual studio 2013.

Pro’s

It means you can use the best current free tool for CRM development.  The CRM development toolkit is probably the standard CRM development tool used.

It makes CRM development easier and learning the to use the tool will give you skills required by most CRM re-sellers.

Con’s

Hacking the CRM Dev toolkit can be tricky and there is a possibility it might not continue to work with future updates.

Hacking the toolkit might be unsupported.  In theory it shouldn’t be because it’s not an unsupported customization but an unsupported development environment.

If you work with a team of CRM developers it means all CRM developers need to hack their development environment, which all adds up to a bunch of wasted time.

CRM Solution Manager

The CRM Solution manager is a paid for CRM Development tool.  You can check out here

The License is a £136 / $209.95 dollars and the license is on per computer basis.  There are discounts for bulk license buying (find the details on the site).  My initial opinion is the price doesn’t seem prohibitive.

I haven’t used the CRM solution manager yet but there is a free 30 day trial and with no CRM developer toolkit coming any time soon, so I plan to give it a test run and give a more in-depth review.

Is it available now?

Yes.

It integrates with  Visual Studio 2010, 2012, 2013 and 2015

Works with CRM versions CRM 2011, 2013 and 2015.

Pro’s

The CRM Developers I know who have used the CRM solution manager have only good things to say about it and none of them want to revert back to CRM Developer toolkit once they have used the CRM solution manager.

I will reinstate I have not used CRM solution manager but basing my review on the functionality specified on the CRM solution manager website.

CRM Solution Manager provides the following features for custom plugins and workflows:

  • Build and publish to CRM with the click of a single button.
  • Automatically merge referenced assemblies using ILMerge and then publish the merged assembly to the CRM database.
  • Register multiple steps and images at once.
  • Ability to bulk enable or disable steps.
  • Ability to bulk delete images, steps, plugins and assemblies.

Web resources

  • Download your web resources from CRM directly into Visual Studio. Then create, update and publish any web resource with the click of a single button.
  • Intellisense for the Xrm JavaScript objects are fully supported for both JavaScript and TypeScript

Creation of early bound proxy classes

CRM Sitemap editor

A significant pro is the CRM solution manager is compatible with most version of Visual studio and the last three version of CRM (2011, 2013 and 2015).

A significant pro is the positive reports given by users of the CRM solution manager.

Con’s

I haven’t tried the tool yet (to be changed in the near future) so I’m basing my review mostly on comments on the CRM solution manager website.

It’s a paid for tool (although not expensive) which means lots of companies will not use the tool because they are unwilling to pay the license cost.  This could cause difficulties if you get used to developer with the CRM solution manager and moving to a company which doesn’t use it.  I don’t foresee this being a problem for experienced CRM developers.

I don’t believe usage of the CRM solution manager is wide spread yet but this could change with the lack of CRM developer toolkit

Microsoft release an updated version of the CRM developer toolkit

Maybe there is a reason Microsoft have delayed releasing an updated version of the CRM developer toolkit.  Maybe Microsoft are going to release a new awesome updated version of the CRM developer toolkit

or maybe Microsoft will just do minimal updates to the current CRM developer toolkit to make it compatible with CRM 2015 and Visual Studio 2013.

Is it available now?

No, I haven’t heard anything to indicate this is the case, a deafening silence on the subject from Microsoft.

There is hope to this suggestion because a new version was displayed in Extreme 2014 (9 months ago).  Just imagine how awesome it will be after 9 months more development has been done.

There is a good comment on the connect suggestion

I’ve reached out to the Microsoft sdk team and requested that they put me in contact with Matt Barbour. I was at eXtreme CRM in Las Vegas where he demoed the CRM Developer Toolkit for CRM 2015. That was in October 2014 which was 9 months ago and we still haven’t heard any news! We were also urged to utilize Connect and assured that Microsoft pays attention to the feedback here. So far there still has not been any response from Microsoft on this thread after being created nearly 5 months ago. Hopefully Matt will be able to provide an update once I can get in contact with him.

Pro’s

Continuity.  The majority of CRM developers could continue using the CRM developer toolkit.

The CRM developer toolkit works well and most developers understand how it works and it’s quirks.  An updated version would allow CRM developers to concentrate on CRM development.

Con’s

If it does happen it’s likely to be some distance in the future, which means it wouldn’t be of much use to CRM developers now.

It’s not available and might never be.

Microsoft release the CRM Developer toolkit as opensource

Microsoft could release the CRM Developer toolkit as an opensource project and allow the CRM community to update the CRM developer toolkit.

Is it available now?

No, it’s just the Hosk thinking out loud.

Pro’s

It would allow the CRM developer toolkit to be quickly updated to work with CRM 2015 and Visual Studio 2013.

The Microsoft Dynamics CRM community has many talented CRM developers who could work on improving the CRM developer toolkit.

Con’s

An open source CRM developer toolkit could become bloated with functionality not needed by the majority

The CRM community creates a CRM Developer Toolkit Replacement

The initial purpose of this blog post was to highlight, promote and push people towards Jason Lattimer’s post

Possible Developer Toolkit Replacement?

The templates idea is good and you can see how you can use it to quickly create plugins, although the current solution would involve you then registering the plugin using the Plugin Registration tool and I think this might put some developers off.

CRM MVP Tanguy makes an interesting suggestion, which you can read in the comments

For plugin deployment, did you think about using class attributes to describe how the plugin should be registered?

 

I think it would be a great idea to store a few fields to indicate how to register the plugin and I think it would need something to select the filter fields and image fields, rather than letting the developer paste a list of strings (which gets created by the CRM developer toolkit in the crmregister file)

The enhanced web publisher would be great because Javascript publishing is not great in the CRM developer toolkit.

 

Features I would like

  • Javascript intellisense
  • Deploying plugins with one click from within CRM project
  • early bound file creation, maybe using functionality similar to the CRM Early bound generator

These are my thoughts, please go to Jason’s page and leave your thoughts, insights and support

Is it available now?

No, Jason is still working on it and hasn’t released it as open source but I believe he is planning to.

Pro’s

The CRM community has a lot of talented and active CRM developer would have a history of creating free tools for particular problems/needs.

An open source CRM Developer toolkit replacement could have the potential to create an excellent tool to aid CRM development and add features at a faster rate than the very busy Microsoft developers.

An open source CRM Develoepr toolkit replacement would hopefully be less likely to arrive in the current situation of no compatible toolkit for a new release of CRM/Visual studio.

Con’s

It would involve CRM developer devoting some of their free time to develop a CRM Developer toolkit replacement.

It could take some time before it contains enough features to seriously rival the functionality in the current CRM Developer toolkit.

 

Hosk Blog Most Popular CRM Posts of the Year

I published 202 blogs posts this year!  Which roughly works out at about 4 a week.

Here are the most viewed blog posts this year.  There is a caveat where the posts written at the start of the year have a big advantage over the posts created in the last few months.

I have learnt a lot writing these blog posts and I’m glad they have been viewed so many times

Top 12 blog posts from my blog

1.  MB2-703 – CRM 2013 Customization and Configuration Certification – 7610 views

This page has all of the CRM 2013 Customization and Configuration content I have created to help myself and other people pass the MB2-703 certification.  It works because I passed, which I write about here

2.  CRM 2013 – Setting up Visual Studio with the Developer Toolkit for Microsoft Dynamics CRM – 7478 views

A blog and video tutorial with a step by step guide to setting up the CRM Developer toolkit

3.  CRM 2013 – Step by Step Update Plugin Tutorial using the CRM 2013 Development Toolkit – 7021  views

A blog and video creating a plugin to run on the update stage using the CRM Developer toolkit

4.  CRM 2013 – Understanding Solutions and how they work – 4751 views

A blog post all about Solutions and how they work

5.  CRM 2013 – MB2-703 – CRM 2013 Customization and Configuration Study information – 4362 views

Some study information with links to lots of information including two study guides

6.  CRM 2013 – quick way to get the guid on a form – 4123 views

A quick way to get the guid on a form in CRM 2013, something which as a developer I do all the time.

7.  CRM 2013 – MB2-703 – Customization and Configuration Certification Solution Test Questions – 3857 views

Some test questions on solutions

8.  CRM 2013 – Plugins – Simple update plugin – Redeploying, improving and updating – 3656 views

This blog shows you how to redeploy your plugin with a few changes

9.  CRM 2013 – Javascript to get id of current record – 2613 views

A quick blog which shows you how to get the Guid of the form

10.  CRM 2011/2013 – Javascript to get the object type code of an entity – 2532 views

It’s important to get the object type code programatically because as I found you cannot hard code this value because it could be different in different CRM instances (e.g. DEV, TEST, PROD)

11.  CRM 2013 – How to set up Field Level Security – 2555 views

A blog showing how Field Level security works

12.  CRM 2013 – Workflow to set the current date and time – 2532 views

A workflow which sets the current date and time

CRM 2011/2013 – using ITracingServicing and Mocking it up

I was writing a plugin and I wanted to step through the code whilst writing it but we had a looming deadline and I didn’t have time to write some unit tests, so I decided just to access the plugin console app.

The other plugins were using the ITracingService and I wanted to keep it similar but this ended up causing me a little bit of a problem.

You will often see ITracingService initialized in plugins like this

// Obtain the tracing service from the service provider.

this.TracingService = (ITracingService)serviceProvider.GetService(typeof (ITracingService));

if you use the CRM Developer toolkit you will see this

IPluginExecutionContext context = localContext.PluginExecutionContext;
localContext.TracingService

What is happening here is it does the line above in the Plugin class.  The plugin class does a bunch of donkey work you have to do in all plugins, like get the CRM Service, extending IPlugin.  and the all important method
 

void Execute(IServiceProvider serviceProvider);

 

New to Plugin Development

if you are new to writing plugins, I recommend you check out my blog posts and video on the subject of plugins

https://crmbusiness.wordpress.com/2014/04/07/crm-2013-step-by-step-update-plugin-tutorial-using-the-crm-2013-development-toolkit/

video – Setting up Developer Toolkit for Microsoft Dynamics CRM

blog – Setting up visual studio with the developer toolkit

video – CRM 2013 – Create a simple plugin in CRM 2013 using the CRM Development Toolkit

blog – CRM 2013 – simple update plugin

 

Getting starting with Tracing in plugins

Whilst searching for information about the Tracing, I found a blog I had written back in Feb 2011!!!

CRM 2011 – You can now add tracing to your plugins

https://crmbusiness.wordpress.com/2011/02/08/crm-2011-you-can-now-add-tracing-to-your-plugins/

This is also a good blog on getting started with tracing in plugins

http://inogic.com/blog/2011/01/use-tracing-in-crm-2011-plugins/

 

I know this post is about creating a mock TracingService but whilst I’m here I might as well explain what tracing is used for.

 

Tracing is used to log statements (progress) in your plugins and then if there is an error and you throw a InvalidPluginExecutionException, you see you tracing lines in the error.  This is useful for the basic plugin debugging where you can put in numbered tracing lines and then see what stage you have got to before the InvalidPluginExecutionException was thrown.

here you can see the screen shot from inogic, you can see the tracing was used to show what stage the plugin had reached and some values

 

Back to my problem – creating a Mock tracing object

The reason I needed to create a tracing service because our plugins used the tracing service to log messages and it had a check if it was null and then threw an error.

So I needed to create a TracingService but unfortunatly I could just create a new TracingService e.g.

TracingService tracingService = new TracingService();

TracingService doesn’t roll that way people.

 

To get round the problem , I created a mock tracing service which implemented the TracingService interface and then I would be able to create a new object.

To view the ITracingService interfaced, I right clicked and went to definition, it will display the interface below

[code language="csharp"]
namespace Microsoft.Xrm.Sdk
{
    public interface ITracingService
    {
        void Trace( string format, params object[] args);
    }
}

 [/code]

So I only had one method to stub and in my example I didn’t want to do anything my code called the trace method.

Looking at the trace has a format and then some objects. The code uses this the message is the string format and that is really the only bit I was interested in. So now my MockTracing object prints the Trace text out to the output window.

[code language="csharp"]
  class MockTracing : ITracingService
    {

    public void Trace(string format, params object[] args)
    {

    }

}
[/code]

then I thought perhaps it would useful to show the messages in the Output window in visual studio

[code language="csharp"]
    public void Trace(string format, params object[] args)
    {
        Debug.WriteLine(format);
    }

 [/code]

This worked quite nicely because I could see my progress without throwing an error. I was also able to step through the code.So I finally got to step through my plugin code in my console app and I refreshed my mind on how tracing works in CRM with the added bonus of improving my understanding of tracing in CRM plugins.