This documentation is archived and is not being maintained.

Microsoft Dynamics CRM SDK

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Welcome to the Microsoft Dynamics CRM Software Development Kit (SDK). This SDK contains a wealth of resources, including code samples, which are designed to help you build powerful vertical applications using the Microsoft Dynamics CRM platform. It is a guide for developers who write server-side code, custom business logic, plug-ins, integration modules, custom workflow modules and more. The SDK is an architectural overview of Microsoft Dynamics CRM, the entity model, security model, Web services, and sample code.

The topics in this SDK cover all three types of deployments:

  • Microsoft Dynamics CRM 4.0 - On-premise deployment
  • Microsoft Dynamics CRM 4.0 – Internet-facing deployment (IFD)
  • Microsoft Dynamics CRM Online

The Microsoft Dynamics CRM SDK includes documentation that covers a wide range of instructive and practical information. Before you can use this SDK effectively, make sure that you have Microsoft Dynamics CRM installed. To ensure a successful installation, follow the detailed procedures in the Microsoft Dynamics CRM Implementation Guide. This document describes the required steps to setting up the environment before you install Microsoft Dynamics CRM 4.0. The Microsoft Dynamics CRM Implementation Guide is available on the Microsoft Download Center at

You can download the complete SDK package, which includes all the sample code, walkthroughs, and a style guide at You can print sections of the SDK documentation from the downloaded compiled Help file (CHM). However, you should probably not include the Programming Reference in a print job because of its size.

Check out the other pages on the Microsoft Dynamics CRM Developer Center: Home, Learn, Downloads, Support and Community.

Later in this topic, you will find a detailed list of changes that were made to this document.

In This Section

Getting Started

Provides a list of the main areas of this documentation.

Support and Certification

Describes the details of using the SDK in a supported manner and obtaining certification for your solution.

Microsoft Dynamics CRM Overview

Summarizes the fundamentals of Microsoft Dynamics CRM.

Security Model

Describes the details of the Microsoft Dynamics CRM security model.

Entity Model

Describes the entities used in the Microsoft Dynamics CRM SDK.

Developing Custom Solutions

Shows how to write code to create custom solutions.

Web Services: CrmDiscoveryService

Describes the CrmDiscoveryService Web service, which is used to discover the URL for your organization.

Web Services: CrmService

Explains the CrmService Web service, which is used to interact with the entity instance data for your organization.

Web Services: MetadataService

Describes the MetadataService Web service, which is used to interact with the entity model for your organization.

Advanced Developer Extensions for Microsoft Dynamics CRM 4.0

Introduces the advanced developer extensions, a new set of tools that simplifies and accelerates the development of Internet-enabled applications that interact with Microsoft Dynamics CRM 4.0.

Accelerators for Microsoft Dynamics CRM 4.0

Provides information about add-on solutions for Microsoft Dynamics CRM 4.0.

Upgrading from Microsoft Dynamics CRM 3.0

Contains details about backward compatibility and how to upgrade existing code.

Entity Customization

Provides information about how to customize entities and the services for importing, exporting, and publishing entity customizations.

Visualizations (Charts)

Provides information about how to create custom charts in Microsoft Dynamics CRM Online.


Documents the plug-in model that can be used to implement custom business logic that is executed in response to a Microsoft Dynamics CRM event.

Asynchronous Service

Provides information about plug-in execution from a managed queue that is independent of the main Microsoft Dynamics CRM execution path.


Describes how to create custom workflow components and workflow activities.

Data Management

Provides information about the entities used for operations such as duplicate data detection, bulk delete, data migration, and data import.

E-mail Providers

Describes how to extend the functionality of the Microsoft Dynamics CRM E-mail Router by creating a custom e-mail provider.

Client Extensions and Scripting

Describes ways to customize the Microsoft Dynamics CRM application and Microsoft Dynamics CRM for Microsoft Office Outlook. This includes forms scripting, SiteMap, IFRAMEs, and more.

Customizing Online Help

Explains how to modify the online Help files to add information that is specific to how your organization uses Microsoft Dynamics CRM.

Programming Tips

Provides best practices and programming tips for using this SDK.


Has step-by-step instructions for creating workflows, using the Web services, accessing the metadata, writing plug-ins, and more.

Sample Code

Provides sample code that shows how to write code by using this SDK.

Helper Code

Provides helper code that you can use when you develop extensions for Microsoft Dynamics CRM.

Programming Reference

Lists complete reference documentation for the Microsoft Dynamics CRM SDK.

Report Writers Guide

Contains a guide for developers who write reports for Microsoft CRM using Microsoft SQL Server Reporting Services Report Designer.

Appendix A: Security Roles and Privileges

Contains a detailed list of the roles and privileges provided in Microsoft Dynamics CRM.


Lists definitions for the terminology used in this document.

For detailed information about changes to this documentation, see the following Release History topic.

Release Date
SDK Version 4.0.13, November 2010

Send Us Your Feedback

We appreciate hearing from you. To send your feedback, click the following link and type your comments in the message body.

Note    The subject-line information is used to route your feedback. If you remove or modify the subject line we may be unable to process your feedback.

Send Feedback

Release History

The following table describes the release history for the Microsoft Dynamics CRM SDK.

ReleaseNew and updated topicsDescription of changes
Version 4.0.13 November 2010SDK\SDKReadme.htmUpdated the SDK readme.
 SDK\Bin\*.*Updated on-premises binaries to Update Rollup 13.

Updated online binaries to latest service release.




Updated all binaries for Advanced Developer Extensions.

Added a new plug-in sample using Advanced Developer Extensions.

Updated Advanced_Developer_Extensions_-_Developers_Guide.docx.

Added Advanced_Developer_Extensions_-_Walkthrough_Plugin.docx.

 SDK\Server\FullSample\ServertoServerNoCertsImpersonateAdded a new sample for server-to-server authentication with impersonation where no certificates are required.
 SDK\Server\Helpers\CS\CrmOnlineAuth\WLIDTicket.csUpdated the helper code to correct an issue where secure information was being saved to a publicly readable XML file.
 Connect to the Microsoft Dynamics CRM ServerAdded documentation for additional parameters needed for the CrmSvcUtil tool.
 CrmService Operations Using a Data Context (UsingService)ServiceOperationsUsingaDataContextAdded documentation to show how to call the CrmService using a data context.
 Context ConfigurabilityAdded information about configuring the context for advanced developer extensions.
 Use LINQ to Retrieve Data from Microsoft Dynamics CRMAdded sample code to show how to work with date/time attribute values in the users time zone.
 Using the Generated Classes in Your ProjectAdded information about accessing the Web service and context from a plug-in.
 Event Execution PipelineAdded a security note about plug-ins registered in the Pre-Event stage.
 Metadata MessagesCorrected description of the InsertStatusValueRequest.
 Using the Paging Cookie (PageInfo)Added missing helper methods to the Fetch paging cookie sample.
 Productpricelevel.amountAdded information about using this property with the pricing engine.
Version 4.0.12 May 2010SDK\SDKReadme.htmUpdated the SDK readme.
 SDK\BinUpdated binaries to Microsoft Dynamics CRM Update Rollup 10 and Microsoft Dynamic CRM Online May Service Update.

Note that the WSDL contracts for these releases are unchanged so there is no need to change or recompile source code.

 SDK\Client\ImagesUpdated images provided for use in customizations and applications.
 SDK\WSDL\CrmDiscoveryService.wsdlAdded the Discovery Service WSDL file. This is unchanged, but was missing in the previous SDK package.
 Accelerators for Microsoft Dynamics CRM 4.0Added information about the accelerator add-on solutions available for Microsoft Dynamics CRM 4.0.
 Advanced Developer Extensions for Microsoft Dynamics CRM 4.0 (Microsoft xRM)


Added a new set of tools that simplifies and accelerates the development of Internet-enabled applications. The conceptual documentation is in this Help file. All other resources can be found in the SDK\Microsoft.xRM folder.











Added a note describing the differences between enumeration values using the WSDL compared to the values using the assemblies.
 AssignUserRolesRoleAdded a reference to a KB article describing an issue using this message.
 Comparison between Data Import and Data MigrationUpdated the table to include comparison information about Data Import (on-premises), Data Import (online) and Data Migration (on-premises and online). The topic's title in previous releases was "Differences between Data Migration and Data Import".
 Creating a Dynamic IFRAMERemoved a note that said that Scripts in Microsoft Dynamics CRM cannot interact with DHTML elements in the source document of an IFRAME. Added code sample about how to do this.
 CrmService Sample CodeAdded a note about fixing the namespace when you add the helper code file to your project.
 Custom Workflow Activity: Date CheckerAdded sample code that shows how to compare dates within a workflow, and then send an e-mail.
 Customization Best PracticesAdded to the Customization Best Practices: How Can I Tell What Customizations Have Been Made to a System?
 Data Migration and ImportUpdated information about where to find information about Data Migration Manager and Import Data Wizard.
 Filtered Views

Use Filtered Views

Finding the ID Using Filtered Views

Added a note clarifying that filtered views are not accessible for Microsoft Dynamics CRM Online.
 Recurrence Pattern in Asynchronous Job ExecutionCorrected information about job execution frequency. Removed "MONTHLY" interval and added "YEARLY" interval.
 Registering Plug-ins ProgrammaticallyAdded information about registering custom workflow activities.
 Related DocumentationAdded links to relevant white papers.
 Server-to-Server Authentication

Server-to-Server Authentication with Impersonation

Walkthrough: Server to Server Authentication with CRM Online

LiveIdTicketManager Classes



Added new authentication documentation and sample code for Microsoft Dynamics CRM Online that does not require using certificates. The use of certificates is deprecated.
 Server-to-Server Authentication using Certificates

Server-to-Server Authentication using Certificates with Impersonation

Updated topics to indicate that the Windows Live ID team is phasing out the use of certificates.
 Supported Messages for Plug-ins

Performance Best Practices

Added information about messages that are used by the Web application to retrieve entity data and populate a grid view.
 Unsupported CustomizationsAdded a note about unsupported customizations to the IIS Website.
 Upgrade Issues for Workflow and CalloutsAdded new information about possible upgrade issues and workarounds for assemblies upgraded from Microsoft Dynamics CRM 3.0.
 Using the Web Services within a Custom Workflow ActivityAdded a note explaining why it is recommended to use dynamic entity within custom workflow activity code.
 Workflow Life CycleAdded information about avoiding infinite loops in workflows.
Version 4.0.11 November 2009SDK\SDKReadme.htmUpdated the SDK readme.
 Download an Attachment


Updated the sample code for downloading an attachment. This new method works with the security enhancements added to Microsoft Dynamics CRM 4.0 Update Rollup 7.
Version 4.0.10 October 2009SDK\SDKReadme.htmUpdated the SDK readme.
 SDK\WSDLRemoved the SDK\WSDL folder containing the discovery service WSDL. The WSDL is available through Microsoft Dynamics CRM Online.
 SDK\Tools\PluginRegistrationUpdated the sample code with bug fixes. The version of the tool is unchanged.
 SDK\Server\FullSample\customworkflowactivityUpdated the project and readme to add several new custom workflow activities that you can call from a workflow. For a description of each custom workflow activity, see List of Samples in the SDK Download.


Removed these samples.


Added a Visual Basic .NET version of the authentication sample for the metadata service.


Added remarks that explain that actual duration minutes is set when the state of the activity is changed to Completed. This applies to all activities.

Bulk Operation Entity Capabilities

Clarified that the bulk operation entity is only used for campaign and quick campaign and it is not used for bulk delete, bulk e-mail, or bulk import operations.
 Choosing Between the WSDL and AssembliesAdded a new page that describes when you should use the WSDL versus the assemblies for your development.
 CorrelationToken.CorrelationIdAdded additional documentation for this property.
 Create a Campaign Added a How-to topic that shows how to create a campaign.
 CrmDiscoveryService MessagesAdded a page that lists the messages supported by the CrmDiscoveryService Web service.
 CrmHelpers Classes



Updated the helper code programming reference for Microsoft Dynamics CRM 4.0 Update Rollup 7 and Microsoft Dynamics CRM Online.
 Customizations using the Microsoft Dynamics CRM SDKClarified information regarding the fact that using scripts to hide form elements is not supported and not upgradable.
 Import/Export (Customization File) Schema

SiteMap Schema


Updated the customization schema for new features in Microsoft Dynamics CRM Online.
 importfile.datadelimitercode PropertyClarified information about how to use this property.
 importfile.filetypecode Property

importmap.mapcustomizations Property

ImportFileType Class (CrmHelpers)

Documented a new filetype property that specifies the type of the uploaded source file that is used for import and data migration. This property is available in Microsoft Dynamics CRM Online only The new mapcustomizations property is for internal use only.

Documented a new enumeration that contains the values for the importfile.filetype property.

 Microsoft Dynamics CRM Online Authentication



Updated the source code samples in the documentation and in the SDK download to obtain the organization-specific CrmService Web service URL from the discovery service instead of using a hardcoded string.

Updated the RetrieveCrmTicket, and RetrieveOrganizations samples. Added a sample for RetrieveOrganizations for Microsoft Dynamics CRM Online.

 organization.getstartedpanecontentenabled Property

organization.sampledataimportid Property

SubArea Element



Added new properties to control the Getting Started pane content and the sample data for an organization, and the getting started pane and home page layout for a user.

Added new attributes to the SubArea element of the SiteMap to control the Getting Started pane.

The Getting Started Pane is available in Microsoft Dynamics CRM Online only.

 RetrieveMembersBulkOperationRequest.QueryAdded a new query property to this request, which can be used to limit the data returned when working with very large data sets. This property is available in Microsoft Dynamics CRM 4.0 Update Rollup 7.
 RetrieveOrganizationAdded a new discovery service message that retrieves an organization. This message is available in Microsoft Dynamics CRM Online only.
 Support for .NET Framework VersionsUpdated supported .NET versions to include .NET 3.5, which is needed for visualizations (charts).
 Unsupported CustomizationsUpdated the list of supported DLLs.
 User Interface Style Guide






Added HTML, CSS, and image files that provide a starting point for creating Web pages that look similar to Microsoft Dynamics CRM. Updated the User Interface Style Guide to introduce them.
 Using Filters in a ReportUpdated information about enabling data pre-filtering on reports.
 Using Pre-generated XmlSerializers to Increase Performance

About the Assemblies





Added information about how to improve performance and minimize memory usage when creating XmlSerializer objects or instantiating Web service proxy classes.

Added the Microsoft.Crm.SdkTypeProxy.XmlSerializers.dll assembly to the list of supported assemblies.

Added the Microsoft.Crm.SdkTypeProxy.XmlSerializers.dll assemblies.

 Using the ColumnSet ClassAdded a warning about the possible adverse effects of using AllColumns in a query expression.
 Using the Paging Cookie





Added sample code that shows how to use the paging cookie from using Fetch and using Query Expression.
 Visualizations (Charts)

Visualization (Chart) Sample Code

Visualization (Chart) Data Description Schema




Added documentation for the new Visualizations (Charts) feature, available for the R4 release of Microsoft Dynamics CRM Online only.
 Walkthrough: Client to Server Authentication with CRM Online

Walkthrough: Server to Server Authentication with CRM Online



Updated the source code samples in these walkthroughs to obtain the organization-specific CrmService Web service URL from the discovery service instead of using a hardcoded string.
 Walkthrough: Client to Server Authentication with CRM Online


Updated the procedure to download the discovery service WSDL from Microsoft Dynamics CRM Online.
 Walkthrough: Creating and Registering a Custom Workflow ActivityAdded a walkthrough to demonstrate the steps needed to create a custom workflow activity, register it, and use it from the workflow designer.
Version 4.0.9 June 2009SDK\SDKReadme.htmUpdated the SDK readme with new information about the availability of the Windows Live ID software download needed for server-to-server authentication with Microsoft Dynamics CRM Online.
 SDK\VisualStudioTemplatesAdded three new Microsoft Visual Studio template projects for you to use to start your projects: CRM Web page, plug-in, and custom workflow activity. For more information, see List of Samples in the SDK Download.
 SDK\Client\FullSample\DependentPicklistAdded a new Jscript sample that shows how to make the options available in a picklist field dependent on the selected option of another picklist. This technique supports chaining several picklist fields together. This sample also illustrates best practices for defining functions in the OnLoad event and reusing them in other form events.


Added a new sample that shows how to authenticate and impersonate the logged-on user in a server-to-server scenario with Microsoft Dynamics CRM Online.


















Added new samples to the sample code in the download package.








Added Visual Basic .NET samples to sample code in the download package.
 AutoMapEntity Message (CrmService)

SearchByBodyKbArticle Message (CrmService)

Added new samples in Visual C# and Visual Basic .NET to the documentation.
 AssignUserRolesRole Message (CrmService)

AssociateEntities Message (CrmService)

BulkDelete Message (CrmService)

BulkDetectDuplicates Message (CrmService)

CancelContract Message (CrmService)

CopyCampaign Message (CrmService)

CopyMembersList Message (CrmService)

CreateWorkflowFromTemplate Message (CrmService)

DownloadReportDefinition Message (CrmService)

ExecuteWorkflow Message (CrmService)

ExportCompressedAllXml Message (CrmService)

ExportCompressedTranslationsXml Message (CrmService)

ExportCompressedXml Message (CrmService)

ExportTranslationsXml Message (CrmService)

LoseOpportunity Message (CrmService)

RetrieveParentGroupsResourceGroup Message (CrmService)

Search Message (CrmService)

SearchByKeywordsKbArticle Message

SendEmail Message (CrmService)

SendEmailFromTemplate Message (CrmService)

SetLocLabels Message (CrmService)

SetReportRelated Message (CrmService)

Added Visual Basic .NET sample code to the documentation.
 Build Query Expressions

RemoveItemCampaign Message (CrmService)

RemoveItemCampaignActivity Message (CrmService)

RemoveMemberList Message (CrmService)

RemoveMembersTeam Message (CrmService)

RetrieveAllChildUsersSystemUser Message (CrmService)

RetrieveByGroupResource Message (CrmService)

RetrieveByResourceResourceGroup Message (CrmService)

RetrieveByResourcesService Message (CrmService)

RetrieveDeploymentLicenseType Message (CrmService)

RetrieveSharedPrincipalsAndAccess Message (CrmService)

RetrieveSubGroupsResourceGroup Message (CrmService)

Updated the sample code.
 Create a Picklist with Labels in Multiple LanguagesAdded a new sample that shows how to create a picklist with labels in multiple languages.
 CrmService EntitiesAdded new createdonbehalfby and modifiedonbehalfby attributes to the reference documentation for each entity. These attributes are available only in the WSDL for Microsoft Dynamics CRM Online.
 Customization Best PracticesAdded new information to the following topic: When do I use plug-ins vs. workflow?
 Deletion ServiceAdded a new topic that describes how entities are marked for deletion by the platform and deleted later by an asynchronous job.
 Entity ModelAdded an attribute page for each entity that shows the metadata. This is the information that is available in the metadata browser, which only works for on-premise installations.
 Entity Sample Code

Data Management Sample Code

Plug-in Sample Code

Metadata Sample Code

Workflow Sample Code

Client Extension Sample Code

Added information to refer readers to the full samples that are available in the SDK download package.
 Execution of Microsoft Dynamics CRM 3.0 Callouts

Microsoft Dynamics CRM 3.0 Workflow Backward Compatibility

Updated the statement about support for workflows and plug-ins created for Microsoft Dynamics CRM 3.0. If you have to change assemblies from an earlier version, we recommend that you upgrade the code to avoid issues.
 Finding the ID from ASP.NET CodeChanged use of object type code to entity name.
 How to Delete Asynchronous Operation RecordsAdded a new sample that shows how to use the BulkDelete messages to delete asynchronous operation records that are in a completed state.
 States of a Knowledge Base Article

Creating, Publishing, and Deleting a Knowledge Base Article

Searching for a Knowledge Base Article

Added new conceptual topics that describe knowledge base article states, how to create, publish and remove the articles, and how to search for published knowledge base articles in Microsoft Dynamics CRM.
 RetrieveCrmUserIdByExternalIdAdded a new DiscoveryService Web service message that retrieves the logged-on user's ID in Microsoft Dynamics CRM Online.
 Server-to-Server Authentication with ImpersonationAdded a new topic that describes how to authenticate with Microsoft Dynamics CRM Online in a server-to-server scenario.
 Supported Messages for Plug-insAdded the messages that are supported by custom entities and added support for the Create message for the customeropportunityrole entity.
 Testing and TroubleshootingAdded information about how to make reports generated by the Report Wizard visible in Visual Studio Report Viewer if drillthrough is not working.
 Using Count Aggregation in FetchXMLAdded a new topic that describes the updated aggregation behavior using count.
 Working With Bit Flag ValuesAdded sample code that shows how to test bit flag values.
Version 4.0.8 March 2009SDK\SDKReadme.htmUpdated the SDK readme with new information.


Added helper code for use with Microsoft Dynamics CRM Online server-to-server authentication scenarios.


Class now throws a custom exception that includes the error code. Also added a Visual Basic .NET version of the helper code.
 SDK\Server\Helpers\VB\CrmHelpersAdded a Visual Basic .NET version of the helper code.
 SDK\Tools\PluginRegistrationUpdated the tool to version 2.2. Refer to the included Readme file for more information about software updates and new features.


Added a new project that demonstrates data binding an ASPX DataGrid control with Microsoft Dynamics CRM data.
 SDK\bin\64bit\LiveAdded 64-bit assemblies for use with Microsoft Dynamics CRM Online.
 Promote an E-mail Message to Microsoft Dynamics CRM

CrmService Messages

MetadataService Messages

Added sample code in Visual Basic .NET.
 DeliverPromoteEmail Message

RetrieveByTopIncidentProductKbArticle Message

RetrieveByTopIncidentSubjectKbArticle Message

RetrieveMembersBulkOperation Message

SearchByBodyKbArticle Message

SetStateWorkflow Message

UtcTimeFromLocalTime Message

Added sample code in Visual C# and Visual Basic .NET.
 About the AssembliesAdded information about the execution sequence of plug-ins and workflows in relation to one another and how a pre-event plug-in can prevent a workflow from executing.

BulkDelete Message

Added information about how to use of the BulkDeleteRequest.QuerySet property.
 Calendar Rule Entity CapabilitiesFixed bug. Calendar rule entity instances cannot be retrieved directly. They can only be accessed by retrieving the parent calendar.
 Default Privileges RequiredUpdated this topic with a column of additional information for each privilege.
 Event Execution PipelineAdded information about when plug-ins and workflows are executed in the pipeline.
 How To Convert a Fax to a TaskUpdated sample code to use correct date manipulation methods.
 ISV Extensibility Best PracticesUpdated information about where you should put custom code. This requires Microsoft Dynamics CRM 4.0 Update Rollup 2, which can be found at
 Microsoft.Crm.Sdk.IsvReadiness ClassesAdded IsvReadiness helper classes, which give you a programmatic means to change parts of the Microsoft Dynamics CRM customization XML files.
 organization.trackingprefixUpdated topic about updates to the e-mail tracking token prefix.
 Microsoft Dynamics CRM Online AuthenticationAdded topics to address client-to-server and server-to-server authentication scenarios for Microsoft Dynamics CRM Online.
 Parent and Child PipelinesClarified the information about child pipelines. Added a list of messages that a child pipeline can process.
 RetrieveLocLabels Message

SetLocLabels Message

Clarified use of the messages to retrieve and set localized labels. These messages are used for the localized display names for attributes, not the labels on a form.
 Support for the .NET Framework VersionsAdded explicit statement of support for ASP.NET AJAX.
 Unsupported CustomizationsUpdated support statement about modification of the database. Adding or updating indexes is supported.
 Upgrade Issues for Workflow and CalloutsAdded table of state changes that are handled differently for plug-ins that were upgraded from Microsoft Dynamics CRM 3.0 callouts.
 Upgrading Your Existing CodeAdded a topic that shows the differences between Microsoft Dynamics CRM 3.0 code and Microsoft Dynamics CRM 4.0 code.
 Upload an AttachmentAdded sample code to show how to upload an attachment to an annotation (note).
 Using the Metadata BrowserAdded a note that indicates that the metadata browser works only for on-premise deployments.
 Walkthrough: Server-to-Server Authentication with CRM OnlineAdded a new walkthrough.
 WindowsLiveIdTicketAcquirerAdded documentation for the helper code to support Windows Live authentication.
Version 4.0.7 September 2008SDKReadme.htmAdded documentation for bug 35907.
 importjob ClassAdded new reference topics that describe importjob class and the class properties.
 Import Job Entity CapabilitiesAdded a new topic that describes the capabilities of import job entity.
 Using the Import Job Entity to Track Import ProgressAdded new topics that describe how to start, monitor the progress, retrieve and interpret the results of the import operation that imports entity customizations and translations.
 Default Privileges RequiredAdded a new topic that lists the default privileges you must add to a custom security role. Also added this note to Role Entity Capabilities.
 Microsoft.Crm.Tools.Email.Providers Namespace Added documentation for the classes and enumerations in the Microsoft.Crm.Tools.Email.Providers namespace.
 Exception Handling Behavior

Error Handling in Plug-ins

Logging and Tracing

Added text that indicates which server the event log entry is written to.
 Dependency and Execution OrderFixed a bug in regarding the sequence that asynchronous operations are executed.
 pluginassembly.version PropertyAdded text on how to obtain the version number according to standard .NET practices.
 Execution of Microsoft Dynamics CRM 3.0 CalloutsAdded a note to indicate that the onerror subscription attribute in the v3.0 callout configuration file is not supported under v4.0.
 Programming Reference: Microsoft.Crm.Sdk.dllAdded reference documentation.
Version 4.0.6 August 2008SDK\Server\Reference\CS


Added new sample code.
 Sdk\Walkthroughs\Authentication\CS\PassportAdded sample code to access the metadata service from Microsoft Dynamics CRM Online.
 SDK\Tools\PluginRegistrationUpdated to version 2.1. See the Readme for more information.
 SDK\Server\Fullsample\DataBindingFixed a bug where certain data types were not displayed in the grid.


Fixed exception handling code to not consume all exceptions. Exception messages are now written to the console.
 SDK\Server\FullSample\UsingHelpers\CSReplaced the hardcoded TCP port (2525) with code that accesses the Outlook service to determine whether the client is offline.
 SDKReadme.htmAdded Send Us Your Feedback link.
 Creating a Simple Plug-in

Creating a Plug-in for Microsoft Dynamics CRM for Outlook that Works Offline

Writing a Plug-in


Updated the plug-in sample code to use DynamicEntity instead of strong types.
 Customization File ReferenceCompleted reference documentation for the supported elements in the customization file.
 E-mail ProvidersAdded new topic about how to develop custom providers for the E-mail Router service.
 ExportCompressedXml Message

ExportXml Message

ImportCompressedXmlWithProgress Message

ImportXml Message

ImportXmlWithProgress Message

PublishXmlMessage Message

Other Nodes Available for Import and Export

Updated all import, export and publish sample code and documentation where it refers to the request.ParameterXml property. In some cases, sample code showing the value of that property was missing required XML nodes.
 Global FunctionsAdded detailed reference documentation for scripting functions.
 How to Add a CrmService Web Reference

How to Add a MetadataService Web Reference

Added information about how to add a Web reference using Microsoft Visual Studio 2008.



Added sample code for each message.
 Microsoft.Crm.SdkTypeProxy ClassesAdded a note to clarify that you should use the request and response classes along with the DynamicEntity class found in this assembly for creating plug-ins and custom workflow activities.
 Passing Parameters to a URL using ISV.ConfigAdded information about how to escape the ampersand character for query string parameters from a client extension control defined using ISV.Config.
 PrependOrgName FunctionAdded a new function that is used to add the organization name to a URL.
 SupportClarified support for modification to the customization file.
 Using Dynamic Entity in Plug-insAdded a topic that describes why you should use the DynamicEntity class in plug-ins.
 Using Microsoft Dynamics CRM URLsAdded documentation about constructing URLs for different deployment types.
 Using the Paging Cookie

Using FetchXML

Added information to topics about using the paging cookie in Fetch.
 Web Service AuthenticationAdded a known issue to the SDK Readme about server-to-server authentication with Microsoft Dynamics CRM Online.
Version 4.0.5 May 2008SDK\Readme.htmUpdated readme file with late-breaking information. Also, changed the product name throughout the documentation to Microsoft Dynamics CRM Online.
 SDK\Bin\Added 64-bit versions of assemblies. For more information, see About the Assemblies.



Added Visual Basic .NET versions of all samples.
 SDK\Server\FullSample\DataBindingMoved the using statements for the Web references into the namespace code block so that the Visual C# code would compile in Visual Studio. Updated the Readme.doc file.









Added new sample code.


Updated sample code.
 Accessing Microsoft Dynamics CRM Web ServicesUpdated information about the GenerateAuthenticationHeader function.
 Add a Web page to NavigationAdded a sample that adds an external Web page to the Navigation pane of the application.
 Avoiding Denial of ServiceReplaced the sample code with a fuller sample that can be compiled.
 Categorizing and Displaying Reports in Different LanguagesAdded a new topic that describes how to categorize and display reports in different languages.
 Entity and Attribute MappingAdded information about how to use the AutoMapEntity message.
 Entity ModelAdded SetStateDynamicEntity as a valid message on all entities that support the SetState message. Added a note that you should register your plug-in to fire on both messages for complete coverage of set state operations.



Added sample code for these messages.




Corrected message information to show that the progress is logged in the import job entity. Documentation and sample code for working with the import progress log will be added in a future update.
 Formatting ContentUpdated information about how to format values for time, date, number, and base/transaction currency.
 Linking the ReportsAdded a new topic that describes how to link related reports.
 Managing a Report in the Offline ModeAdded a new topic that describes how to manage the reports in the offline mode.
 Organization UI Entity CapabilitiesAdded a note stating that this entity will change significantly in the next release.
 Parent and Child PipelinesAdded information and sample code showing how to instantiate the Web services in code executing within a child pipeline.
 RetrieveCrmTicketUpdated sample code.
 RetrieveOrganizationResourcesAdded a new message that retrieves data about the resources used by an organization in Microsoft Dynamics CRM Online
 Retrieving Data from Related RecordsAdded sample code that shows how to reference data from related records using XMLHttp requests to the Microsoft Dynamics Web service using the RetrieveMultiple message in client-side code.
 Sample Custom Workflow Activity: Return a Calculated Value

Sample Custom Workflow Activity: Create a Task

Sample Custom Workflow Activity: Get the Next Birthday

Sample Custom Workflow Activity: Calculate the Credit Score

Added custom workflow activity sample code.
 SDK Message Entity CapabilitiesAdded a mapping of message names to categories.
 Support for Multiple LanguagesAdded a topic regarding translating customized entity and attribute text.
 Supported Entities for Asynchronous OperationsAdded a topic that lists the entity types that are supported for an asynchronous operation.
 Upgrade Issues for Workflow and CalloutsUpdated upgrade information for Microsoft Dynamics CRM 3.0 callouts.
 Walkthrough: Capturing Sample HTTP RequestsAdded new topic that shows how you can use a Web Debugging proxy to capture SOAP packets for Microsoft Dynamics CRM Web service calls from a console application. These SOAP packets are provided in the necessary format for you to use in your JScript code from form events or from ISV.Config client extension controls.
 WorkflowRemoved the "Signing the Workflow Assembly" topic. Custom workflow activity assemblies do not have to be signed.

Added information to the Adding Metadata to the Custom Workflow Activity topic about using the PersistOnCloseAttribute to enable a workflow to retry after an error has occurred.

 Writing Custom Code for Microsoft Dynamics CRM 4.0 for Outlook

Use the Methods in the Outlook SDK Assembly

Added new topic that contains information about using the Microsoft Dynamics CRM for Outlook SDK.
 CrmService.Create method using JScript

CrmService.Delete method using JScript

CrmService.Execute method using JScript

CrmService.Fetch method using JScript

CrmService.Retrieve method using JScript

CrmService.RetrieveMultiple method using JScript

CrmService.Update method using JScript

Added JScript samples to demonstrate using the CrmService methods. These samples correspond to the Visual C# and Visual Basic .NET examples for the common CrmService methods found in CrmService Class.
Version 4.0.4

April 2008

SDK\Readme.htmUpdated readme file with late-breaking information.
 SDK\FullSample\OnlineOfflinePluginAdded a new sample that shows how to write an online plug-in and an offline plug-in which work together to perform the same operation only one time.
 BackgroundSendEmail MessageAdded sample code.
 Creating a Plug-in for Microsoft Dynamics CRM for Outlook that Works OfflineAdded a step to the walkthrough that demonstrates offline plug-in security.
 How to: Add the CrmDiscoveryService Web Reference: CRMOnlineAdded a topic to show how to get the Web reference for Microsoft Dynamics CRM Online.
 How to Change Label text in the Navigation PaneAdded step-by-step instructions for how to change the label text in the navigation pane.
 How to Control Update Access for a FieldAdded a new scripting sample that allows you to control which users can update data in a field.
 Linking Reports Added a new topic about linking reports.
 Managing a Report in Offline ModeAdded a new topic about managing reports when offline.
 Microsoft.Crm.Outlook.Sdk NamespaceCompleted reference documentation for this namespace.
 Offline Plug-in SecurityAdded information about the additional security restriction for an offline plug-in, which requires that a registry key named after the public key token of the plug-in assembly be added to the system registry.
 Outlook Sample CodeAdded sample code that interacts with Microsoft Dynamics CRM for Microsoft Office Outlook.
 Privileges by MessageAdded detailed privilege information for most messages.
 Programming ReferenceAdded information to incomplete topics and fixed broken links.
 Promote an E-mail Message to Microsoft Dynamics CRMAdded sample code that shows how to create an e-mail activity instance from an e-mail message in an inbox.
 Publishing a Report Updated the "Privileges" section and the new "Ownership and sharing" section.
 Publishing a Report Added information about publishing a report using the Microsoft Dynamics CRM Web services.
 QualifyMemberList MessageAdded sample code.
 Send a Bulk E-mail and Monitor the JobAdded sample code that shows how to send a bulk e-mail and monitor its progress.
 Start an Asynchronous Bulk Delete Job and Review ResultsAdded sample code that shows how to start a bulk delete job and then review the results.
 TransformImport MessageAdded remarks indicating that this message requires the Data Migration Manager to be installed.
 What's New in Reporting Added a topic that describes the changes in reporting in Microsoft Dynamics CRM 4.0.
 Writing the Plug-in ConstructorAdded a topic explaining how to write a constructor for a plug-in that accepts parameters. These strings can be used to pass information to the plug-in at run time.
Version 4.0.3

March 2008

SDK\Readme.htmUpdated readme file with late-breaking information.
 SDK\Server\FullSample\CustomWorkflowActivityAdded a new full sample that demonstrates the use of a custom workflow activity. For a description of this sample, see Sample Code in the SDK Download.
 SDK\Client\FullSampleFixed bugs in client sample code.


Fixed bugs in server sample code.
 Tools\PluginDeveloperRemoved code for working with secure strings because of instability issues.
 Tools\PluginRegistrationMajor upgrade to this tool to support more features of the plug-in registration APIs. New features include:
  • Improved graphical user interface that includes a server connections pane, tabbed tree view of registered assemblies/steps/images for each connection, and the first phase of online help assigned to the F1 key. More online help will be available in future releases. Multiple separate GUI forms have been condensed into a single main window for an improved user experience.
  • Support for multiple connections to Microsoft Dynamics CRM 4.0 servers. Connection information is saved to the disk for reuse in the next session.
  • Support for secure and non-secure information passed to a plug-in's constructor and filtering attributes.
  • Support for ordering the execution of a plug-in step within a stage of the execution pipeline.
  • Ability to disable/enable a step.
  • Support for exporting and importing registration configuration information using the same (register.xml) file format supported by PluginDeveloper.
  • Support for custom entities and attributes.
 Walkthroughs\Authentication\CS\PassportAdded code to handle an expired ticket. If the ticket expires, the sample attempts to obtain a new ticket. If, after several attempts, a new ticket cannot be obtained, the sample will throw an exception and exit.
 Attributes and Microsoft Dynamics CRM TypesUpdated the list of attribute types for workflow.
 Customization FileAdded a new topic about how to export the customization file using the Web application.
 MetadataService Web ServiceRemoved erroneous references to OrderStatus and UpdateStatusValue. These classes are not found in the MetadataService Web service.
 Other Nodes Available for Import and ExportAdded sample code showing how to export the site map and ISV configuration using an API.
 Programming ReferenceAdded information to incomplete topics and fixed broken links.
 Recurrence Pattern in Asynchronous Job ExecutionUpdated information about specifying frequency for recurring asynchronous operations (system jobs).
 Report Writers GuideAdded the first installment of the report writers' guide.
 Utility Sample CodeAdded a new topic that describes the utility code used in the SDK samples.
 How to Retrieve a List of Messages and Entities that Support Plug-insAdded a new sample that shows how to obtain a list of those messages and entities that support plug-ins.
Version 4.0.2

February 2008

SDK\Readme.htmUpdated readme file with late-breaking information.
 SDK\Server\FullSample\DataBindingAdded missing DataBinding sample code.
 Removed from SDK:





Removed workflow tools and walkthroughs to reduce confusion. The workflow tools previously included in the SDK are not needed for custom workflow activities.
 ISV Extensibility Best PracticesUpdated information about where to deploy custom code.
 Activity Party (activityparty) Entity CapabilitiesAdded information about the use of the activityparty.addressused property to control which e-mail address is used.
 Recurrence Pattern in Asynchronous Job ExecutionAdded information about how to set the recurrence pattern for an asynchronous job.
 Workflow: Attributes and Microsoft Dynamics CRM TypesUpdated information about the supported types for custom workflow activities.
 Enabling Duplicate DetectionUpdated the information about the use of the organization.isduplicatedetectionenabledforonlinecreateupdate property.
 Import File Entity CapabilitiesUpdated information about the correct ordering of messages for the import entity.
 Programming ReferenceAdded information to incomplete topics and fixed broken links.
 What's New in Microsoft Dynamics CRM 4.0Added data management features to What's New topic.
Version 4.0.1

January 2008

 Removed erroneous files from SDK\Tools folder.

Updated Readme file in SDK\ProjectTemplates folder.

Fixed broken links in documentation.

 Walkthroughs: Plug-insFixed plug-in walkthrough.
 Scripting Sample CodeAdded scripting sample code.
 URL Addressable Forms and ViewsAdded additional content about passing parameters to forms.
Version 4.0.0

December 2007

 Initial version.

© 2010 Microsoft Corporation. All rights reserved.