Business winning courgettes and why multi tasking slows you down

I’m part of a business management group with Mike Ames Flair project, this is because Mike works in the same building and used to be director of Crimson Ltd

Mike is a business development coach who previously built up a company and sold it for 40 million, so getting any advice from Mike is good stuff, plus you can usually wangle a pint if you catch him at the bar.

Business development sounds a bit naff when you read it, it’s reminds of words like “in the cloud”, “social Media”, “internet 2” you are never totally sure what they mean.  I will use this blog post to encourage people to invest some time in it and if you are lucky enough to catch a talk from Mike then I recommend you do it.

Business development in my opinion is basically making yourself more efficient and making the most of your time and situations.  I have been on Mike Flair training course and it’s extremely useful and interesting.  I had been a fan of listening to self help books, things like 7 habits of successful people, Tony Robbins book awake the giant within, 4 day week, who moved my cheese etc etc, The 1 minute manager.

To sum these books up it’s basically about making goals, making a plan and prioritising your time to achieve them.  One of my biggest annoyances in life is battling against procrastination and wasted time.  I recommend reading/listening to these books and if you can get yourself on a business development course then do it.

Mike has got some guinea pigs to help him with new material and he has created the Flair tribe group and for this group we had to write a blog.  Today my blog has been published on Mike’s blog and you can read it here

There was also another guest blog post this week which I really enjoyed with the excellent title of

Is it possible to win new business by using courgettes?

it’s a bit of a Friday diversion for you, everyone needs a rest from CRM once in a while.

CRM 2011 – Custom Workflow Syntax changes from CRM 4 to CRM 2011

[tweetmeme source=”BenHosk” only_single=false]

I am always interested in articles describing the differences between developing in CRM 4 and CRM 2011.  This is a common problem I have and it actually works both ways.

To start with I was trying to convert code examples in Javascript and Plugins from CRM 4 to CRM 2011 and finding that we use Entity instead of DynamicEntity etc.  The Javascript is completely different so I’m not going to mention that but if you want to know click the link below.

I also find myself getting confused when I have to do some coding in CRM 4 because I get used to working CRM 2011 and then I have to remember how to do things in CRM 4 again…

Here are the current syntax comparison blogs I have written

CRM 2011 – Syntax changes in plugins from CRM 4

CRM 2011 – Comparison between CRM 4.0 and CRM2011 script

Type Mapping Between Versions CRM 2011 and CRM 4

Now today I found this article explaining the differences between custom workflows in CRM 4 and CRM 2011, it’s an excellent article and the original can be found here but I have pasted the full article below because I would like it for my own reference

Differences in Custom Workflow Assembly in CRM 4.0 and CRM 2011

We have listed the list of changes noticed for designing a custom workflow assembly in CRM 2011 and in CRM 4.0.

1. References

CRM 4.0

using System.Workflow.Activities;

using System.Workflow.ComponentModel;

using System.Workflow.ComponentModel.Compiler;

using Microsoft.Crm.Sdk;

using Microsoft.Crm.Sdk.Query;

using Microsoft.Crm.SdkTypeProxy;

using Microsoft.Crm.Workflow;

CRM 2011

using System.Activities;

using Microsoft.Crm.Sdk.Messages;

using Microsoft.Xrm.Sdk;

using Microsoft.Xrm.Sdk.Workflow;

2. Base Class


Base class definition has been changed from  SequenceActivity to CodeActivity.

CRM 4.0: In CRM 4.0 we have to specify both Workflow name and Workflowactivitygroupname in the code as written in the following code.

[CrmWorkflowActivity(“My Custom Workflow”, “CRM Workflow”)]

public class MyCustomWF: SequenceActivity

CRM 2011: In CRM 2011 that is done in different way.

public class MyCustomWF: CodeActivity

Both Workflow name and Workflowactivitygroupname can be specified at the time of registering the assembly as shown in below screen shot.

3. Execute Method

The overridden Execute method remains the same except parameter and return type.


CRM 4.0

protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)


CRM 2011

protected override void Execute(CodeActivityContext executionContext)

4. Create service

CRM 4.0

IContextService contextService = (IContextService)executionContext.GetService(typeof(IContextService));

IWorkflowContext context = contextService.Context;

ICrmService crmService = context.CreateCrmService();

CRM 2011

IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();

IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();

IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

5. INPUT Parameters

CRM 4.0

Declaration: how to initialize the input parameter

// specified dependency property

public static DependencyProperty CaseIDProperty = DependencyProperty.Register(“CaseID”, typeof(Lookup), typeof(TotalTaskRetrieval));

// Specified Input property

[CrmInput(“Enter Case “)]

// Set the reference Target for Property created


// Property Defined for caseId

public Lookup CaseID




return (Lookup)base.GetValue(CaseIDProperty);




base.SetValue(CaseIDProperty, value);



Use: Access the input parameter declared above as,

Guid caseid=CaseID.Value

CRM 2011

Declaration: how to initialize the input parameter

[Input(“Enter Case “)]

[ReferenceTarget(“incident “)]

[Default(“3B036E3E-94F9-DE11-B508-00155DBA2902″, ” incident “)]

public InArgument<EntityReference> CaseID { get; set; }

Use: Access the input parameter declared above as,

Guid caseid = CaseID.Get<EntityReference>(executionContext).Id

6. OUTPUT  Parameters

CRM 4.0


public CrmMoney Sum




return (CrmMoney)base.GetValue(SumProperty);




base.SetValue(SumProperty , value);



CRM 2011



public OutArgument<Money> Sum { get; set; }

CRM 2011 – JScript IntelliSense for Form Script Libraries in version 5.0.3

A fantastic blog entry from the Microsoft Dynamics CRM blog today about Jscript Intellisense for Form Script Libraries, click here to read it.  Sometimes I wonder why you need to keep updating your version of CRM 2011 but then when I read the goodies they have added into the latest version, I then want to upgrade.

The blog post also led me to a page I hadn’t seen JScript Intellisense Overview and it also has an interesting page Walkthrough:Jscript Intellisense

it is a really in depth blog entry about how they added in JScript Intellisense with the new release of SDK 5.03, here is a brief quote from the blog post

In the latest release of the Microsoft Dynamics SDK (Version 5.0.3) you will find a Microsoft Dynamics CRM Solution and Visual Studio extension that together will provide IntelliSense support for the Xrm.Page object in form scripts. I hope that this solution will help make your process of creating form scripts using the Xrm.Page object more productive. The result is that you can have IntelliSense that provides auto completion and documentation about the methods as shown below:


The SDK\Templates\Xrm.PageScriptProjectTemplate\Readme.docx file in the download package provides details about installing and using the solution. Rather than repeat what you can find there, in this post I will describe the process of creating this solution and I hope to set your expectations for what the solution offers.