List of Samples in the SDK Download
[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
The SDK download contains the following full samples demonstrating the use of features in the SDK, complete with Microsoft Visual Studio solutions, ready for you to build and integrate into Microsoft Dynamics CRM. The download is located at Microsoft Dynamics CRM 4.0 Software Development Kit (SDK).
The how to samples can be found in this section. The reference samples can be found with each message and method documented in the SDK. In addition, the download includes the full samples described below.
Visual Studio Templates
The following table lists the development templates included in the download in the folder SDK\Server\VisualStudioTemplates.
|CS|VB\AddOnWebPage||A template Web site project you can use to create your own Microsoft Dynamics CRM sample dialog Web pages. The template provides the following features:
|CS|VB\Plugin||A template project you can use as a starting point for your plug-in.|
|CS|VB\WorkflowActivity||A Microsoft Visual Studio 2005 or Visual Studio 2008 template that provides a good starting point for writing a Microsoft Dynamics CRM custom workflow activity. The template provides the following features:
Server Sample Code
The following table lists the full samples included in the download in the folder SDK\Server\FullSample.
|OnlineOfflinePlugin||This sample shows how to write an online plug-in and an offline plug-in which work together to perform the same operation only one time.
When a plug-in is registered for both online and offline execution, the plug-in could be executed twice. If the plug-in executes while offline it will be executed again when the client goes online and synchronizes with the Microsoft Dynamics CRM server. This sample demonstrates a simple technique to examine the CallerOrigin property of the plug-in context to determine if the offline plug-in has already executed and performed the desired operation.
|CustomWorkflowActivity||This folder contains the following sample custom workflow activities:
Date Checker - If the opportunity's "Est. Close Date" is greater than 10 days, sends an e-mail message to the administrator to verify the close date with the owner of the opportunity.
Distance Calculator – Uses the Microsoft MapPoint SDK to calculate the distance between zip codes.
Add Activity – Adds two numbers and returns the result.
Custom Activity – Creates a task.
Update Next Birthday - Returns the next upcoming birthday that has just passed. If this year's birthday has not yet occurred, it will return this year's birthday. Otherwise, it will return the birthday for next year.
Retrieve Credit Score - Calculates the credit score based on the Social Security Number (SSN) and name.
|DataBinding||This sample demonstrates how to bind the results of a retrieve or query to a Windows Forms or Web application data grid.|
|DataMigration||This sample shows how to use data migration with a complex mapping.|
|ImportExportPublish||This sample includes an XML file with Bank Accounts and Safe Deposit Boxes as new entities that need to be imported. The sample shows the following process:
|MetadataDiagram||This sample command line tool creates a Microsoft Office Visio diagram detailing relationships between Microsoft Dynamics CRM entities.
First, this sample reads all the entity names from the parameter list or defaults to all entities. It creates a Visio object for the entity, and for each entity related to the entity, and then it links them together. Finally, the file is saved.
|MultiCurrencyPlugin||This sample demonstrates how to override the built-in RetrieveExchangeRate plug-in with a custom RetrieveExchangeRate plug-in. The custom plug-in allows for tracking orders that happened in the past. In this scenario, orders are initially tracked on paper. At a later point in time, when the user creates this order in Microsoft Dynamics CRM, the user wants to specify a past exchange rate that is relevant at the time the order was created on paper.|
|PluginInstaller||This sample contains an installer for a plug-in.|
|PluginPostInvoice||This sample contains a post-event plug-in for an invoice to update a custom field (Year To Date Revenue) to be the total amount of all invoices during the current Fiscal year for the customer.|
|PluginPreAccount||This sample shows how to use pre-event plug-in on Accounts to auto-generate the account number.|
|UsingHelpers||This sample demonstrates how to use the helper code to create a query and to instantiate types.|
|ServerToServerImpersonate||This sample demonstrates how an ISV can authenticate with Microsoft Dynamics CRM Online and perform business data changes on the customer's behalf.|
|CreateVisualization||This sample demonstrates how to create a custom chart. This is supported in Microsoft Dynamics CRM Online only.|
Client Sample Code
The following table lists the full samples included in the download in the folder SDK\Cient\FullSample.
|ActivityEvents||The phone call activity form is customized to include a customer field named Call Type with the following values:
On the customized phone call form, the duration and a custom field named Other Call Type is disabled. If the user chooses Other, the Other Call Type field is changed to be enabled and required.
|DependentPicklist||Demonstrates a technique to filter the options available for a picklist field based on the selected option in another picklist field. This technique allows for linking more than two picklist fields.
This sample replaces the DynamicPicklists sample found in previous versions of the Microsoft CRM SDK.
© 2010 Microsoft Corporation. All rights reserved.