Sample Code Downloads

banner art

In addition to the samples in this document, 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 CRM. The SDK download is available at this location: www.microsoft.com/downloads/details.aspx?FamilyId=9C178B68-3A06-4898-BC83-BD14B74308C5\&displaylang=en. The SDK download also includes reference and how to samples.

The following table describes the full samples included in the SDK download.

Full sample name Description
CalloutSample This sample shows how to use Pre-Callouts on Accounts to auto-generate the account number.

It also contains a Post-Callout 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.

DataBinding This samples demonstrates how to bind the results of a retrieve or query to either a WinForm data grid or an ASP.NET data grid.
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:
  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.
MetadataDiagram This sample command line tool creates a Microsoft Office Visio diagram detailing relationships between Microsoft 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.

WorkflowPlugin Demonstrates the use of workflow .NET assemblies. As a new Lead is created, if a custom field called Auto Route is set to true, the lead is assigned to the user with the fewest leads. The user must have the Customer Service Representative role.

© 2007 Microsoft Corporation. All rights reserved.