Home Page Icon
Home Page
Table of Contents for
Programming Microsoft Dynamics® CRM 4.0
Close
Programming Microsoft Dynamics® CRM 4.0
by Jim Steger Mike Snyder Brad Bosak, Corey O’Brien, and Phil Richardson
Programming Microsoft Dynamics® CRM 4.0
Programming Microsoft Dynamics® CRM 4.0
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Foreword
Acknowledgments
Jim Steger’s Acknowledgments
Mike Snyder’s Acknowledgments
Brad Bosak’s Acknowledgments
Corey O’Brien’s Acknowledgments
Philip Richardson’s Acknowledgments
Introduction
Who This Book Is For
What This Book Is About
Companion Content
System Requirements
Client
Server
Find Additional Content Online
Support for This Book
Questions and Comments
I. Overview
1. Microsoft Dynamics CRM 4.0 SDK Overview
Software Development Kit Introduction
Hitchhiker’s Guide to Common Questions
Can we alter the CRM database structure to add our custom tables and columns?
How do we write custom code that gets data into and out of Microsoft Dynamics CRM?
Can we change the current CRM form layouts and controls?
How do we implement our own custom business logic?
How much control do we have over the user interface and branding?
How do we deploy changes from one system to another?
Will our customizations upgrade when Microsoft releases a new version of the software?
Are role-based security permissions supported and configurable?
Does Microsoft Dynamics CRM support multiple languages and currencies?
Will our programming customizations run offline?
How do you recommend we set up a Microsoft Dynamics CRM development environment?
Microsoft Dynamics CRM as a Business Application Platform
Summary
2. Development Overview and Environment
Microsoft Dynamics CRM 4.0 System Overview
Microsoft Dynamics CRM 4.0 Versions
Microsoft Dynamics CRM Components
Licensing
Server Roles
Hardware Requirements
Microsoft Dynamics CRM 4.0 Web Server Requirements
Virtualization
Development Environment
Server Environment Development Options
Isolated Development Environment
Sharing a Common Microsoft Dynamics CRM Organization
Using a Hybrid Environment
Using Different Organizations in a Single Microsoft Dynamics CRM Deployment
Developing Customizations Accessed From Outlook
Testing Environment Considerations
Migrating Data
Native Microsoft Dynamics CRM Import
Data Migration Manager
Third-Party Tools
Custom Code
Redeployment
Development Tools
Integrated Development Environment (IDE)
Source Control
Continuous Integration Tool
Installer
Additional Development Utilities
Additional Development Considerations
Summary
3. Communicating with Microsoft CRM APIs
Overview of the Microsoft Dynamics CRM 4.0 SDK
Accessing the APIs in Visual Studio 2008
CrmService Web Service
Authentication
Authenticating to the API Services
Configuring the Security Token
Understanding the Security Context of a Method Call
Common Methods
Execute Method
Request and Response Classes
DynamicEntity Class
Attributes
MetadataService Web Service
CrmDiscoveryService Web Service
Connecting to Microsoft Dynamics CRM IFD
Connecting to Microsoft Dynamics CRM Offline
Connecting to Microsoft Dynamics CRM Online
Summary
II. Extending Microsoft CRM
4. Security
Role-Based and Object-Based Security
Security Principals
Access Rights
Impersonation
Impersonation for Web applications
Impersonation for Plug-ins
Using the Microsoft Dynamics CRM SDK to Perform Security-Related Operations
Programmatically Creating a Security Role and Adding Privileges
Programmatically Assigning a Security Role
Retrieving Roles and Privileges
Sharing Records
Assigning Records
Using Direct SQL for Accessing Microsoft Dynamics CRM Data
Determining the Organization’s Connection String
Filtered Views
Additional Programming Considerations with Filtered Views
Data Encryption
One-Way Encryption
Two-Way Encryption
Summary
5. Plug-ins
Writing Your First Plug-in
Creating the Plug-in Project
Implementing the Plug-in Class
Building the Registration Tool
Deploying the Plug-in
Mode
Stage
Deployment
Messages
Entities
Rank
Assembly Location
Images
The Event Execution Pipeline
Supported Messages and Entities
Parent and Child Pipelines
IPluginExecutionContext
Impersonation
Impersonation During Registration
Impersonation During Execution
Exception Handling
Exceptions and the Event Processing Pipeline
Exception Feedback
Deployment
Plug-in Entities
Programmatic Plug-in Registration
Images
Programmatic Image Registration
Custom Configuration
Deploying Referenced Assemblies
Debugging Plug-ins
Remote Debugging
Logging
Unit Testing
Mock Objects
Test Frameworks
Sample Test
Sample Plug-ins
Rolling Up Child Entity Attributes to a Parent Entity
System View Hider
Customization Change Notifier
Summary
6. Programming Workflow
Overview
The Workflow Designer
Testing the Workflow
Workflow Definitions
Automatic Workflows
Manual Workflows
Child Workflows
Workflow Steps
Dynamic Values in Workflow
Operator
Look for Options
Dynamic Values Box
Default Value
Windows Workflow Foundation
Activities
Dynamic Value Binding
Custom Workflow Activities
Implementing a Custom Activity
Deploying the Custom Assembly
Registration with the PluginRegistration Tool
Programmatic Custom Activity Registration
Testing the Custom Activity
Investigating Custom Activity Errors
CRM Workflow Attributes
Workflow Context
Entity Images in Custom Workflow Activities
Creating an Entity Image Debugging Activity
Using the DebugEntityImagesActivity
Workflow Designer Limitations
Example Activities: Math Building Blocks
Example Activity: Retrieve Most Available User
Example Activity: Calculate Related Aggregate
Summary
7. Form Scripting
Form Scripting Overview
Understanding Client-Side Scripting with Microsoft Dynamics CRM
Referencing Microsoft Dynamics CRM Elements
Available Events
Calling Web Services from Script
Using the CRM API SOAP Request from Script
Testing and Deployment
Debugging JavaScript
Additional Testing and Debugging Tips
Scripting from ISV.Config Buttons
Advanced Topics
Form Type Considerations
Cross-Site Scripting (XSS)
Using Script for Validation
Loading External JavaScript Files
Scripting Examples
Display Customer Information in a ToolTip
Setting the Form’s Title at Run Time
Enhancing the Form’s Display
Summary
8. Developing with the Metadata Service
Connecting to the MetadataService
Referencing the MetadataService
Locating the Endpoints
Application Settings
Discovery Service
Plug-ins
Offline
Using the MetadataService with the CrmImpersonator Class
2006. Endpoint
Microsoft Dynamics CRM Security
Retrieving Metadata
Names Used in the MetadataService
Retrieving Entities
RetrieveEntityRequest
RetrieveAllEntitiesRequest
Retrieving Attributes and Relationships
Attribute Considerations
Relationship Considerations
Multilingual Strings
Available Languages
Remote Customization
Entities
Creating Entities
Updating Entities
Deleting Entities
Attributes
Display Masks
Picklists
Relationships
One-to-Many Relationships
Many-to-Many Relationships
Relationship Eligibility Messages
Publishing Metadata
Caching the Metadata
Using the Timestamp
Example File System Cache
Handling Errors
Summary
III. Advanced Topics
9. Deployment
Common Deployment Steps
Build
Install
Configure
Uninstall
Removing the Solution Components
Deleting Metadata and Transactional Data
Deploying Microsoft Dynamics CRM Components
Customizations
Importing Customizations
Using the MetadataService
Publish Customizations
Importing the Organization
Workflow Rules, Templates, and Security Roles
User Interface Changes (Forms, ISV.Config, and Sitemap)
Custom Web Pages
Plug-in and Workflow Assemblies
Online Help
Custom Reports
Configuration Settings
Offline Application Deployment
Offline Web Applications
Plug-in Allow List
Testing Strategies
Server Topologies
Operating Systems
Web Browsers
Database Servers
Authentication
Multi-Tenant
Multilingual
Accessibility
Additional Deployment Considerations
Missing Prerequisites
Resetting IIS
Customizations Management
Example Deployment Sequence
Component Inventory
Build
Install
Configuration
Uninstall
Summary
10. Developing Offline Solutions
Overview
Offline Development Environment
Workstation
Laptop
Virtual PC
Offline Navigation
Client Attribute
AvailableOffline Attribute
Communicating with the Microsoft Dynamics CRM SDK API Offline
CrmService Offline
Offline Message and Entity Availability
Creating a CrmService Instance Offline
MetadataService Offline
Microsoft Dynamics Outlook SDK
Scripting for Offline
Developing Iframes for Offline
Programming the IFrame
Deploying the IFrame Page
Microsoft Dynamics CRM Customizations
Microsoft Dynamics CRM Web Server
Microsoft Dynamics CRM for Outlook with Offline Access
Testing the IFrame Page Offline
Developing an Offline Plug-in
Programming the Plug-in
Deploying the Plug-in
Testing the Plug-in
Offline Development Considerations
Summary
11. Multilingual and Multi-Currency Applications
Programming for Multilingual Applications
CrmService Messages for Multilingual Support
Exporting and Importing Translations
Using the Metadata Service for Multilingual Applications
Programming the Multilingual IFrame
Deploying and Testing the Multilingual IFrame
Using Resource Assemblies for Multilingual Strings
Updating the Multilingual IFrame with Resource Files
Deploying and Testing the Updated IFrame
Programming for Multi-Currency Applications
Summary
12. Advanced Workflow Programming
Custom Workflow Manager Tool
Workflows as Entities
The workflow Entity
Interacting with Workflows Through CrmService
Workflow Publication
The workflowdependency Entity
Retrieving Workflow Dependencies
Declarative Workflows
XAML Syntax
XAML in Microsoft Dynamics CRM
Creating Your First Declarative Workflow
Declarative Workflow Deployment
Examining Native Workflow XAML
Exporting Workflows Programmatically
Summary
13. Emulating User Interface with ASP.NET Development
IFrame Development
Programming the IFrame
Populating the Form
Handling a Form Submit
Deploying and Testing the IFrame
Dialog Box Development
Programming the Dialog Box
Deploying and Testing the Dialog Box
ISV Page Development
Programming the ISV Page
PopulateLeadTable and PopulateOpportunityTable
PopulateActivityTable Method
Deploying and Testing the ISV Page
Summary
14. Developing Custom Microsoft CRM Controls
Overview
CrmPicklistControl
Programming the CrmPicklistControl
CrmPicklistControl Properties
Adding Options to the CrmPicklistControl
Testing the CrmPicklistControl
CrmBooleanControl
Programming the CrmBooleanControl
CrmBooleanControl Properties
Adding Options to the CrmBooleanControl
Testing the CrmBooleanControl
CrmDateTimeControl
Programming the CrmDateTimeControl
CrmDateTimeControl Properties
Adding the Child Controls
Creating the Calendar Pop-Up
Testing the CrmDateTimeControl
CrmEntityPicklistControl
Programming the CrmEntityPicklistControl
CrmEntityPicklistControl Properties
Binding the Data
Testing the CrmEntityPicklistControl
CrmGridViewControl
Programming the CrmGridViewControl
CrmGridViewControl Properties
Adding the Columns
Creating the CrmGridViewTemplate
Creating the DataSource
Updating the Record in Microsoft Dynamics CRM
Testing the CrmGridViewControl
Summary
15. Additional Samples and Utilities
Utility Classes
MetadataUtility Class
Customizations Utility
Additional Script Samples
Conditionally Enabling Attributes
Hiding Navigation Links on a Form
Field-Level Security
Hiding Tabs and Fields on a Form
Hiding a Tab
Hiding and Showing a Field and Label
Field-Level Security Script
Field-Level Security Script Example
Summary
A. About the Authors
Jim Steger
Mike Snyder
Brad Bosak
Corey O’Brien
Philip Richardson
B. About Sonoma Partners
C. Additional Resources for Developers from Microsoft Press
Visual Basic
Visual C#
Web Development
Data Access
.NET Framework
Other Developer Topics
D. More Great Developer Resources
Developer Step by Step
Developer Reference
Focused Topics
Index
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
SPECIAL OFFER: Upgrade this ebook with O’Reilly
Programming Microsoft Dynamics
®
CRM 4.0
Mike Snyder
Jim Steger
Brad Bosak
Corey O'Brien
Phil Richardson
Copyright © 2009 Jim Steger (All); Mike Snyder (All)
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset