Export (0) Print
Expand All

List of Samples in the SDK Download

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

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.

Folder nameDescription
CS|VB\AddOnWebPageA template Web site project you can use to create your own Microsoft Dynamics CRM sample dialog Web pages. The template provides the following features:
  • A Web page with the standard header and body structure of a Microsoft Dynamics CRM dialog page.
  • A style sheet file to support the look and feel of a Microsoft Dynamics CRM dialog page.
CS|VB\PluginA template project you can use as a starting point for your plug-in.
CS|VB\WorkflowActivityA 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:
  • A standard Execute method that takes the ActivityExecutionContext type as a parameter.
  • Web service proxy instantiation.
  • Basic handling of SOAP exceptions.
  • Sample workflow activity input field.
  • Strong name key file.

Server Sample Code

The following table lists the full samples included in the download in the folder SDK\Server\FullSample.

Folder nameDescription
OnlineOfflinePluginThis 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.

CustomWorkflowActivityThis 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.

DataBindingThis sample demonstrates how to bind the results of a retrieve or query to a Windows Forms or Web application data grid.
DataMigrationThis sample shows how to use data migration with a complex mapping.
ImportExportPublishThis 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:
  1. Export current customizations for the purposes of providing a backup
  2. Import the included XML file that contains new customizations.
  3. Publish the imported customizations.
MetadataDiagramThis 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.

MultiCurrencyPluginThis 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.
PluginInstallerThis sample contains an installer for a plug-in.
PluginPostInvoiceThis 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.
PluginPreAccountThis sample shows how to use pre-event plug-in on Accounts to auto-generate the account number.
UsingHelpersThis sample demonstrates how to use the helper code to create a query and to instantiate types.
ServerToServerImpersonateThis sample demonstrates how an ISV can authenticate with Microsoft Dynamics CRM Online and perform business data changes on the customer's behalf.
CreateVisualizationThis 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.

Folder nameDescription
ActivityEventsThe phone call activity form is customized to include a customer field named Call Type with the following values:
  • Cold Call
  • Screening
  • Call-back
  • Follow-up
  • Other

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.

DependentPicklistDemonstrates 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.


Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft