Print the Course OutlineEmail this Register for this courseFind more courses
 
Microsoft Business Solutions CRM - .NET Tools to Extend Microsoft CRM.NET Tools to Extend Microsoft CRM
Course 8308  

Introduction

This three-day instructor-led course provides students with the knowledge and skills to begin creating implementation specific customizations to Microsoft Business Solutions CRM using the classes and methods described in the Microsoft CRM Software Development Kit (SDK).

This course assists a .NET developer use the Microsoft CRM Platform classes and methods to build basic implementation specific solutions that integrate with Microsoft CRM. This course helps a developer recognize where they can use code to take advantage of the customization features built into Microsoft CRM. It shows them how to integrate their applications into Microsoft CRM as well as how to communicate with the Microsoft CRM Platform.

This course also provides a number of best practices to help make the development process more efficient and the finished product easier to maintain.

This is a hands-on course that gives participants opportunities to use what they are learning to develop practical solutions.


Audience
This course is intended for experienced .NET developers who will be connecting to, or extending Microsoft CRM to add new functionality or integrate Microsoft CRM with another application.


At Course Completion
After completing this course, students will be able to:

Extend application functionality using Microsoft JScript® with the OnChange event
Use the Workflow Post-URL action to integrate with other applications
Better understand the Microsoft CRM Object Model
Use the Microsoft CRM Class Libraries
Link to external data using the post callout model.
Develop alternative User Interfaces to Microsoft CRM


Prerequisites
Before attending this course, students must have:

A minimum of one year development experience
A minimum of six months experience working with Microsoft .NET technologies
Completed the companion course .NET Tools to Extend Microsoft CRM or the recommended courses listed below.
In addition, it is recommended, but not required, that students have completed:

Course 8020, Microsoft CRM Customization

Core .NET Programming language courses such as:

Course 2373 Programming with Microsoft Visual Basic .NET
Course 2559 Introduction to Visual Basic .NET Programming with Microsoft .NET
Or

Course 2609 Introduction to C# Programming with Microsoft .NET
Course 2124 Programming with C#
Core .NET Framework courses such as:

Course 2415 Programming with the Microsoft .NET Framework (Visual Basic .NET)
Course 2349 Programming with the Microsoft .NET Framework (C# .NET)
Course 2389 Programming with ADO .NET
Core ASP.NET courses such as:

Course 2063 Introduction to ASP.NET
Course 2310 Developing Web Applications using Microsoft Visual Studio .NET


Microsoft Certified Professional Exams
No Microsoft Certified Professional exams are associated with this course currently.


Course Materials
The student kit includes a comprehensive workbook and a companion CD which contains an application to install the code used in the course.


Additional Reading
To help you prepare for this class, review the following resources:

Microsoft Business Solutions Content:
Microsoft CRM Customization Course manual
Microsoft CRM SDK
Books from Microsoft Press:
Microsoft Visual Basic .NET Step by Step or Microsoft Visual C# .NET Step by Step
Coding Techniques for Microsoft Visual Basic .NET
Building Web Solutions with ASP.NET and ADO.NET
XML Step by Step, Second Edition


Course Outline
Module 1: Microsoft CRM Architecture and Customization
This module explains how the Microsoft CRM Architecture and security model apply to customizations, provides an overview of the built in Customization tools, examines the Post-URL action of CRM Workflow, the capabilities of the OnChange event, how Microsoft CRM uses Web Services and the Microsoft CRM SDK.

Lessons
Microsoft CRM Architecture
Microsoft CRM Security model
Microsoft CRM Customization Tools
Post-URL Actions in Workflow
OnChange event
Application Integration
Calling Microsoft CRM using Web Services
Integrating Web Services and Microsoft CRM
Microsoft CRM SDK

Practice: Working with the Post-URL Action
Use the Post URL action to write data to a file

Lab 1.1: OnChange Event
Display a message to the user based on the value selected

Lab 1.2: OnChange Event
Use the Document Object Model to modify the value of another field based on the value selected

Lab 1.3: OnChange Event
Update a field value from an external web applications based on picklist selection

After completing this module, students will be able to:

Understand the Microsoft CRM Architecture
Understand the Microsoft CRM Security model
Use the Microsoft CRM Workflow Post-URL action
Use the Microsoft CRM OnChange event
Understand how Web Services can be created to interact with Microsoft CRM
Understand the purpose of the Microsoft CRM SDK

Module 2: Microsoft CRM Object Model
This brief module provides a high level overview of the objects within the Microsoft CRM platform and how they interact. This will provide a review of the Microsoft CRM entities and describe the relationships between them. This module provides a starting point to discuss the Microsoft CRM Class libraries. There are no labs in this module.

Lessons
Documentation on the CRM Object Model
Core System Management
Customer Management
Sales Force Automation and Marketing
Customer Service Management
Miscellaneous

After completing this module, students will be able to:

Understand the structure of the Microsoft CRM Object Model
Understand the relationships and dependencies between objects
Understand how objects are documented
Understand selected methods and capabilities of the different objects

Module 3: Introduction to the Microsoft CRM Class Library
This module describes how to use the Microsoft CRM class library. You learn how to use the SDK to get the information you need. The class library components are introduced as well as prerequisites for making method calls. The interfaces exposed by the library are described as well as examples of common methods, enumerations and types. Other topics include: how security can be handled in custom applications, best practices and advanced topics when using the class library, and how structured exception handling can be applied to error thrown by Microsoft CRM

Lessons
Microsoft CRM Class Library Structure
Steps to invoke methods
Common methods
Using Enumerations & Types
Security
Best Practices
Using a configuration class
Using an Abstract class
Creating a Wrapper class
Handling Exceptions from Microsoft CRM

Practice: Calling a Microsoft CRM Platform Method
Creating an Account

Lab 3.1: Change the Accounts class and create a CRMException class
Change the Accounts class to derive from the CRM BusinessBase class
Create CRMException class to implement the BaseApplicationException class
Create a ThrowCRMException method in the CRMBusinessBase class
Use the ThrowCRMException method in the CRMBusinessBase class constructor

Lab 3.2: Create a configuration and a wrapper class
Create a CRM Configuration class
Reference Microsoft.CRM.Platform.proxy.dll and Microsoft.CRM.Platform.Types.dll
Create a CRM Wrapper Class

Lab 3.3: Create a CRMIdentity class in the Accounts Application
Create GetCaller method in the CRMWrapper class
Create RetrieveUserPrivileges method in the CRMWrapper class
Create CRMIdentity class
Create and initialize a CRMIdentity field in the CRMBusinessBase class

Lab 3.4: Upload an Accounts XML file and export it into Microsoft CRM
Review the Upload.aspx file
Change the Accounts.aspx code behind file to use the uploaded file name from the session
Create a public static CreateAccount method in the CRMWrapper class
Create a public Create Method in the Accounts class
Create a public ExportToCRM method in the Accounts class
Add an Export button to the Acccounts.aspx page and enable it only when the user has privilege to create an account
Implement the Export button event to export to Microsoft CRM
Test it and check the results in Microsoft CRM

After completing this module, students will be able to:

Understand the Microsoft CRM Class library structure
Invoke Microsoft CRM class library methods
Retrieve a users security credentials
Understand the common methods found in the Microsoft CRM Class library
Understand the Microsoft CRM class library enumerations and types
Understand how to check a user’s security privileges and access rights
Use a Configuration class
Use an Abstract class
Use a Wrapper class
Handle exceptions thrown by the Microsoft CRM Platform

Module 4: Microsoft CRM Class Library
This module provides a more in-depth understanding of the Microsoft CRM class library. It focuses on common create, retrieve, update, delete, share and assign methods found in most Microsoft CRM objects. It also explores options for querying data. This module provides ample opportunity for hands-on practice with these methods.

Lessons
Creation and Retrieval Methods
Modification and Deletion Methods
Sharing and Assigning Methods
Custom Queries

Lab 4.1: Display the leads you own
Create a public static RetrieveLeadsByPrincipal method in the CRMWrapper class
Create a public Retrieve method in the Leads class to initialize the DataSet_ds field
In the Leads.aspx code-behind file, change the get method of the MyLead property to initialize the session leads object to the leads you own
Implement the PageIndexChanged event procedure to page the DataGrid

Lab 4.2: Add a new Lead
Create a CreateLead method in the CRMWrapper class
Create a public Create method in the Leads class
Enable the NewLead button only when the user has the privilege to create a lead
Implement the Save button click event
Test the application

Lab 4.3: Update Leads
Add the code in the DataGrid1_ItemDataBound event procedure to open a new child window to edit the selected row
Create an UpdateLeadMethod in the CRMWrapper class
Create RetrievePrincipalAccessLead method in the CRMWrapper class
Create HasWriteRightLead method in the CRMWrapper class
Create HasWritePermission method in the Leads class
Create Update method in the Leads class
Enable the Save button and editing fields only when the user has permission to update the lead in the NewLead.aspx code-behind file
Implement the Save button click event in the NewLead.aspx code-behind file
Test the application

Lab 4.4: Delete a Lead
Create a DeleteLead method in the CRMWrapper class
Create HasDeleteRightLead method in the CRMWrapper class
Create HasDeletePermission method in the Leads class
Create Delete method in the Leads class
Enable the Delete button only when the user has permission to delete the Lead in the NewLead.aspx code-behind file
Implement the Delete button click event in the NewLead.aspx code-behind file

Lab 4.5: Retrieve Hot Leads
Create an ExecuteQuery method in the CRMWrapper class
Create an ExecuteQuery method in the CRMBusinessBase class
Create a RetrieveHot method in the Leads class
Implement the HotLeads button click event procedure in the Leads.aspx code-behind file
In the Leads.aspx code-behind file, add the cod in the get method of MyLeads property to initialize the session leads object to the hot leads
Test the application

Lab 4.6: Complete the Send Me More Info application
Run the Skeleton application
Complete the Submit button click event procedure in the FillForm.aspx code-behind file to create a Lead
Test the application

After completing this module, students will be able to:

Use the common methods exposed for each class by the Microsoft CRM class library
Check users’ permissions to determine whether they can perform specific actions
Use the CRMQuery class to create, store, manage and execute queries in
Microsoft CRM

Module 5: Linking to External Data
This module focuses on the ways that data from external applications can be linked to objects stored on the Microsoft CRM Server. This module demonstrates how the post-URL action in Workflow can be used to post Microsoft CRM to another application. The ability to use Post-Callouts to build a more robust data integration is introduced as well as how Microsoft® Message Queue Server™ and Microsoft® BizTalk server are use in this process.

Lessons
Integrating External Data with Microsoft CRM
Using Post-URL actions
Creating a Web Service to Process Post URL
Using Post-Callout Methods
What is Component Services?
Steps to use a Serviced Component
Understanding the Post-Callout Architecture
The ICRMCallout Interface
Registering Callouts with Microsoft CRM
Best Practices with Post-Callouts
Using Messaging
Using BizTalk Server

Lab 5.1: Lead Survey Application (using Post URL)
Run and observe the skeleton Survey application
Create a lead in Microsoft CRM and conditionally assign it to a salesperson. Then save the survey data in SQL Server with the leadId
Add a button to the Microsoft CRM Lead and Contact forms to display the survey page for a particular lead or contact
Complete the UpdateCustomerId web page to update the link field in the Survey database
Create a workflow rule in Microsoft CRM for the event of contact creation to post a URL to the web page
Test it
Inactivate the workflow

Lab 5.2: Using Post-Callout
Create a class library project
Create a CRMCallout class to implement the ICRMCallout interface PostCreate method
Strong Name the assembly
Add the component to the GAC and Register it in the COM+ service
Register the component in Microsoft CRM
Test it

Lab 5.3: Use Post-Callout and MSMQ
Create a private method _SendtoMessageQueue to create a message queue and send a message to it
Modify the PostCreate method in CRMCallout.cs or CRMCallout.vb to invoke the _SendtoMessageQueue
Add the component to GAC and register it in the COM+ service
Test it

After completing this module, students will be able to:

Understand how external data can be linked with Microsoft CRM
Use the Post-URL action in Workflow to post data to an external web application
Use Post-Callouts to implement a notification mechanism for data integration
Use Microsoft Message Queue Server to process changes to Microsoft CRM data asynchronously
Understand how BizTalk Server may be used to involve multiple applications in the messaging process or to execute long running business processes

Module 6: User Interface Alternatives
This optional module focuses on alternative techniques you can used to represent data from Microsoft CRM to users. These alternative user interfaces can be used to augment the ways that external solutions can collect and display data that resides in Microsoft CRM. This module shows how to make the interface of a custom application consistent with Microsoft CRM through the use of cascading style sheets (CSS). It also introduces how Microsoft® Office 2003 applications such as Word, Excel, and InfoPath® can be integrated with Microsoft CRM using Visual Studio® Tools for Office. Also alternative user interface allowing users to perform edits within a grid is presented. This module is presented if time permits.

Lessons
Using CSS with Custom Applications
Using Microsoft CRM CSS Styles
Using Microsoft CRM with Word to create a Mail merge document
Using ASP.NET for In-Place Editing
Using Office 2003 with Microsoft CRM
Visual Studio Tools for Office 2003
Excel 2003 Programmability
Using InfoPath 2003
Integrating InfoPath with Microsoft CRM

Lab 6.1: Applying CSS Styles
Link the template.css to the Newlead.aspx file
Apply the classes in the Template.css to the controls in the NewLead.aspx file

Demo: Create a Mail Merge Document
Using Word, Internet Explorer, and ASP.NET

Demo: A Grid to Maintain Leads
In-place editing using a DataGrid

Demo: Visual Studio Tools for Office and Excel
A simple example of importing Microsoft CRM data into Excel 2003 to create a pivot table report.

Demo: Using InfoPath 2003
Retrieve and submit leads using InfoPath

After completing this module, students will be able to:

Use the Microsoft CRM cascading style sheet (template.css) to make a custom application have the Microsoft CRM look and feel
Use the Word object model with Internet Explorer and VBScript to create a web-based mail merge
Use an ASP.NET DataGrid to provide in-place editing of Microsoft CRM data in a custom application
Use Microsoft Visual Studio Tools for Office to allow managed code to run in an Office document
Use InfoPath 2003 as a front end for Microsoft CRM data using custom web services

For more information or to give feedback, send e-mail to info@OneApex.com or call 949-597-2100