CRM 2011 – Video Sales Stage Dates and workflows

Here is an excellent video from the guys at Zero2Ten

it runs through the sales stages and how to automatically add a date called sales stage date to an opportunity and have a workflow to automatically fill the value in.

This means you can track when the opportunity last moved into a sales stage.

It’s a good way to see the potential of workflows and how you can use them to encourage best practises and automatically fill in values (and avoid letting sales people forget to do it)

How to turn on Logging for the Dynamic Connector

Sometimes you need to look at the logs of the connector because the initial error is not very descriptive and you need a few more clues.

The logs are held in an unusual folder – ProgramData, which is often hidden from browsing, so you often have to paste the folder into windows explorer.

below are the steps to start the logging and where to find the file.

You may have problems editing the Microsoft.Dynamics.Integration.Service.exe.config file and the way around this is to copy the file to another folder, make the change and then copy it back and overwrite the original.

You can get this log following these steps:

  1. Stop the Connector service
  2. Go to C:\ProgramData\Microsoft Dynamics\Connector for Microsoft Dynamics\Logs
  3. Rename the following file (new name is not important): Microsoft.Dynamics.Integration.Service.log
  4. Open the following file in Notepad: C:\Program Files (x86)\Microsoft Dynamics\Microsoft Dynamics Adapter\Microsoft.Dynamics.Integration.Service.exe.config
  5. Locate the following parameter: “Microsoft.Dynamics.Integration.TraceLog”
  6. Set the value for this parm to: 4
  7. Start the Connector service
  8. Reproduce the error
  9. read the log file C:\ProgramData\Microsoft Dynamics\Connector\Microsoft.Dynamics.Integration.Service.log

Get the right people on the bus

It’s a bit of rambling friday post about the book Good to Great which I have been listening to.

I read the blog of Mike Ames who is a business development coach and he recently had a very interesting guest blog post

This blog post echo’s many of the sentiments and principles in the audiobook I have been listening to on my commute to work

Good To Great: Why Some Companies Make the Leap… and Others Don’t

The book compares lots of companies to see why some companies went from being good to great and what they did to achieve this.

The book states the seven characteristics which I have copied from wiki

 Seven characteristics of companies that went “from good to great”

  • Level 5 Leadership: Leaders who are humble, but driven to do what’s best for the company.
  • First Who, Then What: Get the right people on the bus, then figure out where to go. Finding the right people and trying them out in different positions.
  • Confront the Brutal Facts: The Stockdale paradox – Confront the brutal truth of the situation, yet at the same time, never give up hope.
  • Hedgehog Concept: Three overlapping circles: What lights your fire (“passion”)? What could you be best in the world at (“best at”) What makes you money (“driving resource”)?
  • Culture of Discipline: Rinsing the cottage cheese.
  • Technology Accelerators: Using technology to accelerate growth, within the three circles of the hedgehog concept.
  • The Flywheel: The additive effect of many small initiatives; they act on each other like compound interest.

I was quite interested with these two factors

First Who, Then What: Get the right people on the bus, then figure out where to go. Finding the right people and trying them out in different positions.

Hiring the right people is so vital.  When I think all the problems bad workers have caused companies that I have worked at.  The companies have set rules to manage the one or two bad employees (strict working hours for everyone because one person kept coming in late).

Bad employees often need extra management and one to one focus.  It seems slightly crazy when if anyone should be given extra focus it should be your best staff.


The audio book makes the point that the great companies hired the best people and then decide where the company is going.

This fits with my ideas because people’s current experience and technical knowledge might not be useful in their next project or you might need to learn some new skills and next year everything is in the cloud or wherever and you need different skills.

I can compare this to CRM, a new release of CRM means you have to learn new features maybe a new mobile application.  A lot of people learnt Silverlight and then in the future we might all be using HTML 5

The important point is good people will learn these new skills and tackle the new challenges where as not so capable people tend to fear change and drag their feet.

Basically you can learn any technology or skill but you can’t learn personality, drive and attitude.

Hedgehog Concept: Three overlapping circles: What lights your fire (“passion”)? What could you be best in the world at (“best at”) What makes you money (“driving resource”)

If you go to one of Mikes seminars he often gets people to assess what they goals are, I think of it like this


  1. Stop, sit down, think
  2. What are you goals
  3. create a Plan to achieve those goal
  4. Carry out the plan and work hard
  5. don’t forget to stop and reassess at some point


A lot of companies haven’t got a  hedgehog concept, they haven’t narrowed down what they really good at.

Some IT companies will take all IT Projects thrown there way and then have to create a small silo of people to deliver the project (usually involving them learning some new technology skills very quickly indeed).  Then to support the project the company is reliant on the team, making things like holidays a tricky situation because no one can fill in.

Without focusing on a particularly sector or technology then why would a potential customer purchase a solution from that company when compared to another company who specialised in that technology and sector.

If you don’t specialise then you will keep coming up against companies who do specialise and offer compelling reason to do the project with them.

Whilst thinking about the book it’s interesting that I can apply these rules to myself.  What is my hedgehog principle, what am I good at.

Before I started focusing on CRM, I had done lots of different roles and used lots of different technologies but didn’t really focus on any particular role or technology.  Although this is useful in some ways to me now, a few years ago I decided that I wanted to focus on CRM.

I had my goal – to become a CRM expert

I created a plan and then started learning, blogging, reading, writing, eating and sleeping CRM.





How to find the number of users connected to a SQL Server database

I was having some intermittent problems with the connector.  When I turned on the connector it would soon be unable to connect to the SQL database.

I was thinking it maybe be had something to do with the SQL server limiting connections.

The code below will show you the amount of connections and how many on each database.  I found it in this forum post


    DB_NAME(dbid) as DBName, 
    COUNT(dbid) as NumberOfConnections,
    loginame as LoginName
    dbid > 0
    dbid, loginame

And this gives the total:

    COUNT(dbid) as TotalConnections
    dbid > 0

CRM 2011 – Outlook Synchronisation Process – who wins

Someone asked me to explain exactly how the Synchronisation process worked from outlook to CRM.

I wasn’t positive which records would be the last to update, I had a feeling it was the update with the latest time stamp but I wasn’t 100 percent sure.

The person didn’t like this answer at all saying you can’t just overwrite someone else’s change but this is similar to what would happen if you overwrote the change with CRM connected to the live database.

When ever I used to get calls about an Outlook Synchronisation error my heart would sink.  Usually the problem is someone is trying to update a record which has been deleted.

It was interesting because I remember studying the outlook sync process for the CRM 4 installation exam (or I think I remember because nothing like that was in the CRM 2011 exam)  or I remember reading it because I was quite impressed by the process of playback and how the Outlook offline database stores all the changes in order and then plays through them, basically replicating the offline

This blog explains some good points and it’s written by the CRM in the Field guys who know their stuff

the blog above will point you to this document

I’m not sure why there isn’t a CRM 2011 version but I couldn’t find hardly any information on the synchronisation process and which record wins.

The key sentence is this

 Out of the box, Microsoft Dynamics CRM 4.0 does not include built in conflict resolution mechanisms for offline queue playback, and as a result, the last one to playback always wins.

it comes from this paragraph.

Playback of the Offline Queue Table

When the offline client reconnects to the network and goes online, SOAP packets in the Offline Queue table are played back to the server. The application uses start and stop markers to transact certain operations in the application that perform multiple operations in the platform (for example, reopening a case, which requires copying the case line items to the new case). In case of a failure in playing back any operation between a start-stop marker, all the remaining operations are aborted and the sync queue moves to the next stop marker.

Attachments are also captured as part of the SOAP packet that is stored in the offline queue. As a result, each attachment occupies twice the space in the database when created offline. As part of the process of SOAP packet playback, prior to playback the SyncQueue component modifies the SOAP XML to inject:

  • The Authentication token, which is required of all SDK requests. For CRM Online and SPLA/IFD, the Authentication ticket is time sensitive, expiring after a fixed period, so the Authentication ticket is generated and injected into the SOAP packet during playback.
  • A duplicate detection optional parameter, which allows the server’s Duplicate detection infrastructure to take appropriate action based on user settings and upon the user’s selection on the client side (if the user chooses to create the duplicate anyways).
  • A CallerOrigin SOAP header, which alerts the server that a particular SDK request is coming from an offline queue playback. The header also contains a timestamp of when the SOAP packet was added to the offline queue, which allows plug-ins on the server side to use this information to implement custom conflict resolution mechanisms. Out of the box, Microsoft Dynamics CRM 4.0 does not include built in conflict resolution mechanisms for offline queue playback, and as a result, the last one to playback always wins.

Dynamic Connector – Client Hanging when viewing log files

I had a frustrating few hours this morning when the Dynamic Connector client kept freezing, not responding before finally crashing.

I seemed to be getting the error when trying to view the log files for some of the maps.

I tried installing the Dynamic Connector on another server and I was getting the same error.

The solution to the problem (in my case) was fairly straight forward but logical.


deleting all of the Exceptions in the MapExecptions table in the MSDI database

I also deleted all the values from the Logs table as well (for good measure)

Then I re-launched the client and things were good again.

obviously be aware that if you delete the Logs table you won’t have any logs (but I can usually rack up a load pretty quickly)

CRM 2011 – How to copy a workflow

Today I needed to make a few workflows which were very similar to one I had already created.

I looked around CRM but I couldn’t see any copy functionality or a sneaky save as in the workflow (which you can do with lists).

I searched for the problem and there were a few blog posts but I didn’t understand quite what they were telling me because I couldn’t find the Activate as field (just under the Process name if you are wondering)

The solution is quite simple, you basically unpublish the workflow change it’s Activate As to Process template, publish it and then you can create copies of this workflow but only for workflows using the same entity, which when you think about it wouldn’t make any sense to create them for other entities.

This blog has a brilliant step by step process (with pictures)

Dynamic Connector – When new/custom tables won’t add web services

I have been working on a Dynamic Connector upgrade and one of the steps in the upgrade is you have to apply a hotfix.  These hotfix is for the Integration of Countries/Regions hotfix.

I think this was to fix a problem that occurred because in NAV you have a countries/region lookup and this basically just converted to a field in CRM.  sometimes this value was to big for the field in CRM.

So the hotfix meant changing the CodeUnit 5150 and adding in some lines to add the Countries/Regions.

I probably need to explain how (in my mind anyway) the Dynamic Connector works.  In NAV the Pages are used to create Web Services and these web services are used by the connector to read/write data to/from NAV.

When you tick the Enable Connector button in the Marketing Setup it kicks off the codeunit 5150 and this creates and publishes the web services   So when applying the new hotfix the code changes should have run when you ticked/unticked the enable connector button.  The changes should have added a new web service called Integration Countries/Regions.

You can see the web services by pasting the url from the adapter settings, with Services added onto the end


or by opening NAV classic –>Administration–>IT ADministration–>General Setup–>Web Services

or by typing Web Services in NAV 2009/2013

Above you can see the Integration Countries/Regions has been added but the problem I was experiencing was after I made the changes to the code unit and unticked/ticked the enable connector button, it was adding in the new web service.

Something seemed to not be working because usually when you untick the enable connector button it clears all the web services.  One possible solution was that maybe someone else was logged onto NAV.

Anyway the way I got around this was to add the web services manually.

You can go to web services in NAV and add#

Object Type       Object ID       Service Name                                   Published
Page                     10                   Integration Countries/Regions      Yes

You will need to add the values above.  You will also need to add a row to the Integration Page Table (5150)

Service Name Source                     Table ID Page ID Published
Integration Countries/Regions      9             10     Yes 

If you then restart the NAV web services (just to make sure) You should be up and running.

You might sometimes experience a similar problem when adding in custom tables into the Connector

CRM 2011 – CRM Developer Technical Skills

Whilst studying for my Extending CRM 2011 exam and going through a chapter which details the different ways you can access the CRM data, it had a section with the title “Helpful Skills”, which basically details the technical knowledge/skills a CRM Developer needs to be able to interrogate CRM and extract the data.

These would probably be a good tick list for CRM developers (and recruiters) to work to.  I appreciate there are of course other skills and qualities needed and by merely have the technical skills it doesn’t tell you anything about the quality of the work etc but as a broad list of technical knowledge this was pretty good.  A good starting point

The quoted text below comes from the Microsoft training – 80295AE: Extending Microsoft Dynamics CRM 2011.  Free online training for Microsoft Partners and is excellent studying material for anyone taking the exam

Helpful Skills
Microsoft Dynamics CRM offers a flexible platform to extend an application.
However, it is not necessary for a developer or customizer to be familiar with
each of the wide array of customization techniques, tools, and languages offered.
These include the following:
• .NET-connected applications in Visual Studio
• JScript
• Transact – SQL
• Microsoft Dynamics CRM Customization features
• Microsoft Dynamics CRM web services
• Silverlight
• Windows Workflow Foundation 4.0
• REST and SOAP Endpoints
• Windows Azure Platform
• Microsoft SharePoint Server
• Microsoft SQL Server Reporting Services
What is important is for a customizer and developer to have knowledge of the system. Without knowledge of the system, a developer can find himself/herself spending time developing a solution that might already exist.