Microsoft Dynamics CRM 2011
Solutions, IOrganizationService, Xrm.Page, web resources
If you are maintaining this today
CRM 2011 is out of support. Mainstream support ended on 12 July 2016 and extended support on 13 July 2021, against a release date of 18 May 2011. Nothing about its behaviour will change under you now, which is the one comfort of an old platform: what you learn about a 2011 system stays true.
The trap is the other direction. Microsoft’s current documentation describes a platform several generations further on, and the names survived while the meanings moved. Treat anything you read about Dataverse as inapplicable here until you have checked it against 2011’s own documentation.
What changed for customizers
| Area | CRM 2011 | Modern equivalent |
|---|---|---|
| Packaging | Solutions, managed and unmanaged | Solutions, plus pipelines, environment variables and connection references |
| Server logic | Plug-ins registered against the event execution pipeline | Plug-ins and custom APIs |
| Form scripting | The Xrm.Page object model |
formContext, passed into the handler |
| Integration | The organization service, plus a REST/OData endpoint | The Dataverse Web API |
Solutions
Solutions are how work is authored, packaged and maintained: a group of components managed together, which an organization can install and uninstall. They come in two kinds, unmanaged and managed, and the SDK is explicit about one limit that still surprises people: a solution can add new components or overwrite existing ones, but cannot delete a component. Removing something is a separate, manual act.
That single sentence explains a great deal of the mess in a long-lived 2011 organization, where years of imports have accumulated components that nothing installs any more and nothing removed either. How packaging worked before and since is on Customization XML to solutions to pipelines.
Plug-ins and the event pipeline
Plug-in execution is a message pipeline. A user action in the web application, or an SDK call from other code, becomes a message to the organization web service; that message travels through the pipeline, where the platform’s own core operation and any registered plug-ins can read or change it.
Points worth holding on to, all from the 2011 SDK:
- Four stages are available for custom plug-ins. Several plug-ins in one stage are ordered by a rank set at registration.
- Synchronous plug-ins run immediately, in a defined order. Asynchronous ones are queued and run later by the asynchronous service.
- A sandboxed plug-in has two minutes. Exceed it and a
System.TimeoutExceptionis thrown, whether it registered as synchronous or asynchronous. Long work belongs somewhere else. - Not every endpoint triggers plug-ins. Only events from the organization and OData endpoints do, even though the platform hosts other web services.
Form scripting
Client script in 2011 is written against the Xrm.Page object model:
Xrm.Page.getAttribute and Xrm.Page.getControl for the field and
control on the form, with Xrm.Page.ui for tabs and sections and
Xrm.Page.data.entity for the record being edited.
If you are moving code forward, note that the modern platform wants a
formContext passed to the handler instead of reaching for a global. The
shape of the API is recognisably the same; where it is obtained differs.
Upgrading from CRM 4.0
Source: Microsoft’s CRM 2011 Implementation Guide, in its 2013 revision. The whole chain from CRM 3.0 to 9.x is on on-premises upgrade paths.
- Only CRM 4.0 upgrades to CRM 2011. CRM 3.0 goes to 4.0 first, using a trial product key.
- 32-bit 4.0 servers can’t be upgraded in place. CRM Server 2011 runs only on 64-bit Windows Server, so a 32-bit deployment is migrated: install 2011 on a new 64-bit computer, restore the databases to a supported SQL Server, and import each organization with Deployment Manager, which upgrades it. Don’t rename an organization database until the migration is finished.
- Copy custom files across when migrating. Customized .NET assemblies and
configuration files under
Server\bin\assemblyon the 4.0 server don’t move by themselves. - An in-place upgrade upgrades only the default organization. The others are disabled until they’re upgraded with Deployment Manager.
- Remove these first, because 2011 doesn’t upgrade them: the CRM Connector for SQL Server Reporting Services, the Connector for Microsoft Dynamics GP, the Microsoft Dynamics BizTalk Adapter, and the List Web part for CRM 4.0.
- Before Setup: apply the latest 4.0 update rollup, disable SQL Server
replication, and uninstall the 4.0 Reporting Services connector if it’s on
the same computer. The account running Setup needs Deployment Administrators
membership,
db_owneron the 4.0 databases, andsysadminon SQL Server. - An Internet-facing deployment has to be set up again. After upgrading, run the Configure Claims-Based Authentication Wizard and then the Internet-Facing Deployment Configuration Wizard.
- Some things behave differently afterwards:
- each user’s private queue becomes their default queue, renamed with their full name, while public and work-in-progress queues stay as they were;
- ISV solutions move from
InetPub\wwwroot\ISVinto the CRM installation folder, and may not work; - Mobile Express is upgraded with the server.
- Microsoft’s process: upgrade a test environment that mirrors production first. Custom reports, workflows, custom JavaScript and third-party extensions can fail the upgrade or stop working, and may need removing beforehand.
Internet-facing deployment
Source: the CRM 2011 Implementation Guide.
CRM 2011 keeps 4.0’s three configurations (internal only, internal plus internet, internet only), but replaces 4.0’s forms sign-in with claims-based authentication:
- External users authenticate through a security token service such as Active Directory Federation Services. Internal users keep integrated Windows authentication.
- Setup is two Deployment Manager wizards: Configure Claims-Based Authentication, then the Internet-Facing Deployment Configuration Wizard.
- Outlook over the internet needs the external web address entered in the CRM for Outlook Configuration Wizard. With split server roles, that address points at the Discovery Web Service role.
- One binding only. The CRM website can’t have more than one http or https binding, because of a Windows Communication Foundation limitation.
How 4.0 did it is on CRM 4.0.
What this page still needs
Written from the 2011 SDK and, for upgrading and Internet-facing deployment, the 2011 Implementation Guide. The stage numbers are on event pipeline stages. Not yet written, and deliberately not guessed at: security and privilege behaviour.
Sources
- Dynamics CRM 2011 lifecycle (Microsoft Lifecycle Policy) Microsoft support dates for CRM 2011: start 18 May 2011, mainstream support ended 12 July 2016, extended support ended 13 July 2021. The lifecycle table shows end dates at 6:59:59 AM on the following day; the actual end date is the day before. Microsoft’s 2021 end-of-support list confirms 13 July 2021.
- Microsoft Dynamics CRM 2011 SDK (compiled help, CrmSdk2011.chm) Private archive: CRM-SDK-Rescue/2011-SDK_from_desk/SDK/CrmSdk2011.chm Microsoft's own SDK help for the 2011 release, from an owner-held copy. Static reading only; the package is never executed and is not part of this repository. Quote sparingly and cite; do not republish.
- Microsoft Dynamics CRM 2011 Implementation Guide (compiled help, 2013 revision) Private archive: CRM-SDK-Rescue/crm 2011 implementation guide/Microsoft_Dynamics_CRM_2011_IG.zip, CRM2011IG.chm (files dated 15 May 2013) Microsoft's Implementation Guide for CRM 2011 (planning, installing, operating and maintaining), in its May 2013 revision, obtained by the owner. Read as documents only. Covers the only supported upgrade path (from CRM 4.0, with 32-bit servers migrated because CRM Server 2011 is 64-bit only), components not upgraded, queue, ISV and Mobile Express changes, re-enabling IFD with the claims-based authentication and IFD wizards, and the supported Windows Server, SQL Server and IIS versions for CRM 2011.