CRM 2013 FOR DEVELOPERS

The key objective of this course is to enable you to understand different ways of developing against Dynamics CRM with C# and JavaScript.

Course Content and Plan

What this course covers

Extensibility Model and Framework

• Platform Operations

• Querying Data

• Processes

• Server Side Code

• Client Side Scripts

• Client Side Code

• User Interface

What this course does not cover

• C# Programming

• SQL Reporting Services reports

• Service functionality

Module 1 Extensibility Model and Framework

CRM Functionality

Objectives

The key objective of this module is to describe the Dynamics CRM application framework and the different ways CRM can be extended.In this module we will cover:

• CRM Functionality

• XRM Application Framework

• Deployment Options for Dynamics CRM

• What’s New in Dynamics CRM 2013

• Resources available.

Lesson 1-1 CRM Functionality

Microsoft Dynamics CRM is designed to support the sales, marketing and service functions of an organisation.Out of the box, Dynamics CRM provides significant functionality for many organisations and also provides capability to customise and extend the functionality to meet specific business requirements.Third parties also provide pre-built customisations via the Dynamics CRM Marketplace.

Sales

The sales functionality within Dynamics CRM covers the generation of leads for prospecting and qualifying, managing opportunities and keeping track of stages of deal closure, managing and tracking communications between salespeople and the customers, and maintaining a database of product information

• Leads
• Opportunities
• Communication tracking
• Products and Pricing
• Sales processes

Sales Process

The sales process starts with the generation of a lead; that then follows a qualification process to convert it to an opportunity. A quote can be generated for the customer, which then can become an order and, from this order, invoices can be generated. This entire sales process is modelled within Dynamics CRM.

Marketing

The marketing functionality within Dynamics CRM allows you to do campaign planning, campaign budgeting and creating target marketing lists of contacts, accounts and leads that you want to market your services to. You can generate campaigns in order to provide you the ability to send out email blasts or mail to a particular marketing lists, and then tracking and reporting the efficacy of those campaigns through reports and charts.

• Market lists
• Campaigns
• Tracking responses
• Reporting

Service

The service functionality within Dynamics CRM allows you to record cases for issues or ticket tracking for customers, managing services that you provide or contracts that you have with a customer.You can manage the services and resources that you have at hand through appointment scheduling allowing you to take your available resources, schedule them out optimally, and find when they are available to be deployed to render the services that you provide your customers.A knowledge base of existing information and intelligence that you can use to help you more effectively solve cases and issues that may arise with a customer.

• Case recording and resolution
• Contract Management
• Service and Resource Management
• Service Scheduling
• Knowledge Base

XRM Application Framework

Deployment Options

What’s New in CRM 2013

Resources

Testing the question

  • Test 1
  • Test 2
  • Test 3
  • Test 4

Module 2 –Platform Operations

Platform Operations

Platform Operations

The key objectives of this module are to understand how to connect to the WCF web services using .NET and to execute methods to access data.

This module covers connecting to the CRM server and does not include client side access.

Objectives

  • The key objectives of this module are to:
    • Discuss the use and benefits of the Windows Communication Foundation web services
    • Describe the purpose of Discovery Service web service and how it is used
    • How to use the Organization web service
    • Understand the differences between early and late-bound classes
    • Use the Create, Retrieve, Update and Delete Methods
    • Use Request/Response method
    • How to handle exceptions
    • Using Meta Data

Windows Communications Foundation

Microsoft uses the Windows Communication Foundation (WCF) programming model to build service-oriented applications. Developers use it to build secure and reliable solutions that integrate across platforms and interoperate with existing investments.

The Microsoft Dynamics CRM SDK simplifies the use of WCF technology and claims-based authentication. It provides helper proxy classes making it easy to write applications that connect to and authenticate with the Microsoft Dynamics CRM web services. These helper classes can be used in applications so that developers will have to access any Microsoft Dynamics CRM deployment using the same code and without having to become an expert in claims-based security or WCF programming.

Microsoft Dynamics CRM 2013 expands upon the streamlined WCF endpoint introduced in CRM 2011 which replaced prior Web services. The WCF endpoint is a consolidated API that includes both CRM service and metadata service API in earlier versions.

Benefits

There are a number of key benefits to WCF:

  • Web Services
  • Streamlined API
  • Improved performance
  • .NET data types
  • Claims based authentication

Web Services

WCF include abstracts the underlying transport technology, supports standard communications which improves interoperability, and that it is completely extendable to support any new standard or protocol.

The main WCF web service is only available for use with .NET clients. WCF also provides a SOAP web service for use when not connecting with .NET.

The WSDL, service contract definition, is static and the same or any organization.

Streamlined API with a Focused Set of Methods

Each organization has the same service contract with typed classes. The service contract ensures the entity related API will use a generic Entity class.

Standard .NET Types

The API uses standard .NET nullable types for most of the data types.

Claims Based Authentication

Authentication Methods

Microsoft Dynamics CRM 2013 supports two authentication methods:

  • Basic Claims Authentication
  • Active Directory Authentication

Basic Claims Authentication

The concept of a “one size fits all” security for applications accessing from different locations with multiple devices does not work well and so Microsoft created the Windows Identify Foundation (WIF) to address this challenge.

WIF is a framework for implementing claims-based authentication used by Microsoft Dynamics CRM 2013 and other Microsoft applications such as SharePoint.

Claims based authentication uses an industry standard protocol so in theory we can use any Identify Provider to authenticate uses. In essence the authentication of users is handled by a third party.

Claims Based Authentication works together with WCF to provide secure user authentication and a communication channel with a Microsoft Dynamics CRM server. All Microsoft Dynamics CRM editions support claims-based authentication.

The following are some scenarios activated by moving to claims-based authentication:

  •  Support for any Security Assertion Markup Language (SAML) compliant provider
  • Active Directory Federation Services to access Microsoft Dynamics CRM remotely using their existing identities with the need for a VPN.

Secure Token Service

Claims-based authentication requires the availability of a Secure Token Service (STS) running on a server. An STS server can be based on Active Directory Federation Services (ADFS) v2, or any platform that provides the official STS protocol.

Claims-based authentication is made up of a set of WS-* standards that describe the use of a Security Assertion Markup Language (SAML) token. The SAML token is either:

  • Passive mode (when WS-Federation is used with both Microsoft Dynamics CRM 2013 and the Microsoft Dynamics CRM Online web application).
  • Active mode (where WS-Trust is used with Windows Communication Foundation (WCF) clients).

Trusts

Microsoft Dynamics CRM 2013 needs to trust the third party identify provide and accept users passed from the identity provider’s STS and has no need to perform further authentication.

To use Claims-based authentication you must first create a trust between Dynamics CRM and the STS.

Note: How to setup claims based authentication is covered in the MCRM course or refer to the following topics in the Microsoft Dynamics CRM 2013 Implementation Guide.

  • Configure Microsoft Dynamics CRM for an Internet-facing deployment
  • Claims-based authentication and Internet-Facing Deployment (IFD) requirements
  • Configure relying parties for claims-based authentication

How Claims-based Authentication Works

To access a claims configured Microsoft Dynamics CRM 2013 server by using the Microsoft Dynamics CRM SDK, you must first install Windows Identity Foundation (WIF) on the development computer. The Windows Identity Foundation installs the Microsoft.IdentityModel assembly. This is referenced by the Microsoft Dynamics CRM SDK assemblies at run-time.

A request to authenticate a user is sent from Microsoft Dynamics CRM 2013 or Microsoft Dynamics CRM Online or a custom application to the STS server. The STS server determines whether the user should be authenticated, and if this is the case, issues a signed and encrypted SAML token that contains user authentication information.

How Active Directory Authentication Works

A request to authenticate a user is sent from Microsoft Dynamics CRM 2013 or a custom application to Active Directory. The WCF stack manages the authentication process for Microsoft Dynamics CRM SDK API calls from an application, whereas Internet Information Services (IIS) manages authentication for a web application.

Kerberos tickets created and passed between the computers and contain the user authentication information.

Windows Communications Foundation

Microsoft Dynamics CRM Web Services

Early Bound and Late Bound Classes

Create, Retrieve, Update and Delete Methods

Execute Method

Exceptions

Metadata

Module 3 – Querying Data

Query Options

Query Expression

Entity Collection

QuerybyAttribute

LINQ

FetchXML

Filtered Views

Reporting Options

Module 4 Processes

Dynamics CRM Processes

Processes and Entities and Events

Dynamics CRM Process Steps

Workflows

Dialogs

Business Process Flows

Actions

Module 5 Server Side Code

Plugins

Event Framework

Plugin Isolation, Trusts and Statistics

Developing Plugins

Deploying Plugins and Impersonation

Debugging Plugins

Custom Workflow Activities

Declarative Workflows

Outlook and Plugins

Azure

Plugins vs Custom Workflow Activities

Developer Toolkit

Module 6 Client Side Script

Use of JavaScript

Xrm.Page Model

Web Resources

URL Addressable Forms

Best Practice

Debugging JavaScript

Module 7 Client Side Code

Data access using JavaScript

Modern app SOAP endpoint

ODATA

JSON

JQUERY

Module 8 User Interface

User Interface

SiteMap

Command Bar