Monday 31 December 2012

Microsoft Dynamics CRM 2011 - Assemblies Included in the Microsoft Dynamics CRM SDK

Microsoft Dynamics CRM 2011 includes several programming assemblies that you can use when writing custom code.

The following table lists the assemblies that are included in the Microsoft Dynamics CRM SDK.

Assembly name: Microsoft.Crm.Sdk.Proxy.dll

Defines requests and responses for messages business data model specific (non-core) messages as well as enumerations required for working with organization data.

  • Namespace name: Microsoft.Crm.Sdk
Contains enumerations of possible picklists and integer values for some attributes. The naming convention of the classes is <EntityName><AttributeName> to make it easier to locate the specific attribute.

  • Namespace name: Microsoft.Crm.Sdk.Messages
Contains request and responses for business data model specific (non-core) messages.

Assembly name: Microsoft.Xrm.Sdk.dll

Defines the core xRM methods and types, including proxy classes to make the connection to Microsoft Dynamics CRM simpler, authentication methods, and the service contracts.

  • Namespace name: Microsoft.Xrm.Sdk
Defines the data contracts for attribute types, interfaces for authoring plug-ins, and other general purpose xRM types and methods.

  • Namespace name: Microsoft.Xrm.Sdk.Client
Defines classes for use by client-code, including a data context, proxy classes to ease the connection to Microsoft Dynamics CRM, and the LINQ provider.

  • Namespace name: Microsoft.Xrm.Sdk.Discovery
Defines all classes required to communicate with the Discovery Service, including the service contract, all request/responses and supporting classes.

  • Namespace name: Microsoft.Xrm.Sdk.Messages
Defines request/response classes for Create, Retrieve, Update, Delete, Associate , Disassociate, and the metadata classes.

  • Namespace name: Microsoft.Xrm.Sdk.Metadata
Defines the data contracts for Microsoft Dynamics CRM metadata.

  • Namespace name: Microsoft.Xrm.Sdk.Query
Defines query classes required to connect to Microsoft Dynamics CRM.

Assembly name: Microsoft.Xrm.Sdk.Workflow.dll

Defines types and methods required to author a custom workflow activity.

  • Namespace name: Microsoft.Xrm.Sdk.Workflow
Defines the attribute and dependency property classes required to author a custom workflow activity.

  • Namespace name: Microsoft.Xrm.Sdk.Workflow.Activities
Defines the workflow activities that are used by the Microsoft Dynamics CRM workflow designer.

  • Namespace name: Microsoft.Xrm.Sdk.Workflow.Designers
Defines a Microsoft Visual Studio designer for displaying a Microsoft Dynamics CRM workflow in Visual Studio.

Assembly name: Microsoft.Crm.Tools.EmailProviders.dll

Defines methods and types needed for developing a custom email provider component for the Microsoft Dynamics CRM Email Router.

  • Namespace name: Microsoft.Crm.Tools.Email.Management
Defines the email provider management types.

  • Namespace name: Microsoft.Crm.Tools.Email.Providers
Defines the base class for a custom email provider and supporting types.

Assembly name: Microsoft.Xrm.Sdk.Deployment.dll

Defines types and methods for interacting with the Deployment Web Service.

  • Namespace name: Microsoft.Xrm.Sdk.Deployment
Defines the data contracts necessary to communicate with the Deployment Web Service.

  • Namespace name: Microsoft.Xrm.Sdk.Deployment.Proxy
Defines a helper class to generate a proxy for the Deployment Web Service.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Assemblies Included in the Microsoft Dynamics CRM SDK' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online - Programming Using Early and Late Binding

In Microsoft Dynamics CRM 2011, you can choose from several programming scenarios to find the model that best suits your needs. The programming scenario in Microsoft Dynamics CRM 4.0 used the Web Services Description Language (WSDL) with early bound classes for each entity, and the DynamicEntity class for late-bound programming. You were also required to use late-bound programming for plug-in and custom workflow development. All of this has changed with the new programming models.

The main development scenario for Microsoft Dynamics CRM 2011 no longer uses the WSDL. Instead, you now reference two assemblies that allow you to connect to any Microsoft Dynamics CRM system for both early and late bound types. This scenario can be described as late binding or loosely typed. To use late bound types, use the Entity class. This class defines a collection of attributes that can be used to get and set the values of attributes. To use this model, the exact logical name must be known (and specified) as a string.

Alternatively, you can use early bound classes generated directly from the metadata, which include all customizations. The generated classes provide early binding and IntelliSense to aid you as you write custom code.

The DynamicEntity class has been replaced by the base class Entity. This means that all types are discoverable at both build time and runtime, making all strongly-typed entities now loosely-typed entities. You can use both programming scenarios in the same code as shown in the following example:

C#:

Account entity = new Account();
entity["name"] = "My Account"; //loosely typed, late binding
entity.AccountNumber = "1234"; //strongly typed, early binding


The Microsoft Dynamics CRM SDK documentation includes samples that use both programming scenarios. The early bound samples use a file of strongly-typed classes that are generated with the code generation utility from a new, uncustomized installation of Microsoft Dynamics CRM. To run the samples, you must generate a file of strongly-typed classes from your installation. You can decide whether to create a proxy assembly from the generated code file or to include the file in your project directly.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online - Programming Using Early and Late Binding' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online - Introduction to Programming Models

Microsoft Dynamics CRM 2011 offers several programming paradigms designed to give you the flexibility to decide what works best for your needs. An early-bound entity data model has been added that includes an "object services" layer that integrates with the stack and exposes entity values as .NET Framework objects. You can also use the late-bound scenario, which has changed for Microsoft Dynamics CRM 2011.

Programmability Scenarios:


The following diagram illustrates the key programmability scenarios for Microsoft Dynamics CRM 2011.

Key Programmability Scenarios
Key Programmability Scenarios

Use these Microsoft Dynamics CRM 2011 programming paradigms for the following:

  • Early-bound Microsoft Dynamics CRM 2011 uses an entity data model and Windows Communication Foundation (WCF) Data Services technologies to provide a new set of tools that simplify the development of Internet-enabled applications that interact with Microsoft Dynamics CRM. This also enables an additional programming paradigm: an organization service context that tracks changes to objects and supports .NET Language-Integrated Query (LINQ) queries to retrieve data from Microsoft Dynamics CRM.
  • Late-bound – This programming paradigm lets you write code that accesses entities that are not yet defined. For example, you may use this to write a custom search utility that will work for any installation of Microsoft Dynamics CRM, regardless of the customizations that you made. This paradigm also allows code to be written in a generic manner in such a way that it doesn't require a certain type of entity.
  • REST – The REST endpoint for AJAX and Microsoft Silverlight clients provides an alternative interface that you can use to work with Microsoft Dynamics CRM data. Rather than directly invoking the SOAP-based web service, you can execute requests using a service that is based on a URI.
  • WSDL – This programming paradigm lets you develop code from non-.NET clients, and does not depend on the use of Microsoft Dynamics CRM assemblies. For example, you can use this programming model to write code for Microsoft Dynamics CRM in Java.
My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online - Introduction to Programming Models' was informative. Please feel free to leave your comments.

Friday 30 November 2012

Microsoft Dynamics CRM 2011 - Web application and Mobile device Requirements

This section applies to both Microsoft Dynamics CRM Online and Microsoft Dynamics CRM 2011 on premises versions. This section lists the operating system and software requirements for the Microsoft Dynamics CRM web application when running on Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online.

Microsoft Dynamics CRM web application hardware requirements


The following table lists the minimum and recommended hardware requirements for the Microsoft Dynamics CRM web application.

Component:
    Processor (32-bit)
*Minimum:    
    750-MHz CPU, or comparable
*Recommended:
    Multi-core 1.8-GHz CPU or higher

Component:
    Processor (64-bit)
*Minimum:    
    x64 architecture or compatible 1.5 GHz processor
*Recommended:
    Multi-core x64 architecture 2GHz CPU or higher such as AMD Opteron or Intel Xeon systems

Component:
    Memory
*Minimum:    
    2-GB RAM
*Recommended:
    4-GB RAM or more

Component:
    Network
*Minimum:    
    50 kbps (kilobytes per second) bandwidth
    175 ms (milliseconds) maximum latency
*Recommended:
    Better bandwidth and response than minimum.

Component:
    Display
*Minimum:    
    Super VGA with a resolution of 1024 x 768
*Recommended:
    Super VGA with a resolution higher than 1024 x 768

Supported operating systems when you use Internet Explorer


The following operating systems are supported for the Microsoft Dynamics CRM web application:
  •     Windows 8 (Requires Microsoft Dynamics CRM 2011 Update Rollup 10 or later update rollup.)
  •     Windows 7 (all versions)
  •     Windows Vista (all versions)
  •     Windows XP Professional SP3
  •     Windows XP Tablet SP3
  •     Windows XP Professional x64 Edition
Important: Internet Explorer is only supported for running in Mobile Express mode on Mac OS-X (Leopard).

Supported versions of Internet Explorer


The Microsoft Dynamics CRM web application can run in any of the following Internet Explorer versions:
  •     Internet Explorer 10 (compatibility mode) (Requires Microsoft Dynamics CRM 2011 Update Rollup 10 or later update rollup)
  •     Internet Explorer 9
  •     Internet Explorer 8
  •     Internet Explorer 7

Supported versions of Microsoft Office


To use Microsoft Dynamics CRM with Microsoft Office integration features, such as Export to Excel and Mail Merge, you must have one of the following Microsoft Office versions on the computer that is running the Microsoft Dynamics CRM web application:
  •     Microsoft Office 2010 or Microsoft Office 2010 SP1.
  •     2007 Microsoft Office system SP2
  •     Microsoft Office 2003 SP3
Note: Microsoft Windows 2000 editions are not supported for installing and running the Microsoft Dynamics CRM web application.

Microsoft Dynamics CRM mobile device support


There are several options available to access Microsoft Dynamics CRM data from different devices such as mobile phones. 

  • Microsoft Dynamics CRM Mobile Express

In most cases, non-Internet Explorer web browsers use Mobile Express for Microsoft Dynamics CRM mode, which offers reduced access to Microsoft Dynamics CRM typically used for mobile devices.

Mobile Express comes installed with Microsoft Dynamics CRM Server 2011 and is available with Microsoft Dynamics CRM Online. Mobile Express offers great device flexibility because it runs on any web browser that supports common standards, which are HTML 4.0 or a later version, and JavaScript.

Users who want a lightweight experience when accessing CRM data, even with a supported web browser, can run Mobile Express mode by appending “/m” to the URL, for example, https://company.crm.dynamics.com/m or https://crmweb/organization/m.

  • How to force Microsoft Dynamics CRM to run the full web application

By default, Microsoft Dynamics CRM runs in Mobile Express mode when an unsupported browser is detected. To force Microsoft Dynamics CRM to try to run the full web application, append ?web=true to the URL when you sign-in. For example, use the following URL that is appropriate for you.

Warning: The full web application may not run correctly in certain web browsers.

For Microsoft Dynamics CRM Online, orgname is the organization name of your Microsoft Dynamics CRM Online organization.
https:// orgname.crm.dynamics.com/main.aspx?web=true

For on-premises deployment of Microsoft Dynamics CRM 2011, servername is the computer name where the web application is running and orgname is the unique organization name that you entered during Microsoft Dynamics CRM Server Setup or organization import.
https:// servername/orgname/main.aspx?web=true

  • Microsoft Dynamics CRM app for Windows Phone 7

Dynamics CRM app is a Windows Phone 7.5 application which brings Activity Feeds to your mobile device.


My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Web application and Mobile device Requirements' was informative. Please feel free to leave your comments.

Thursday 29 November 2012

Quick, Overall & High-Level Estimations for Enterprise Level Microsoft Dynamics CRM 2011 Implementation

In this blog I will provide a quick high level estimation calculation for any enterprise level Microsoft Dynamics CRM 2011 project.

Currently I am working on a large scale enterprise level Microsoft Dynamics CRM 2011 project. Having a high level estimation on paper is must for the ultimate successful delivery of the project. If you, being a project manager or a team lead, can justify estimations on paper, then it is easier to manage any project. In any project the 3 most important considerations are "tracking daily work", "working to the exact requirements" and "engaging the end user". If you have high level estimations rightly planned and calculated all the above 3 can be carefully achieved.

You can adopt any project methodology for an enterprise level Dynamics CRM 2011 project, but at the end of the day you can deliver the final product only if at the beginning you had your estimations right. You don't have to be 100% accurate. If you have noted down all high level components and the work/time estimations against them, then minor changes during the course of the project becomes easy.

I don't have any estimate template handy, but can give some ideas.

There is a very important factor in Dynamics CRM 2011 project and that is your team members. Your enterprise level A-team will consist of many Business Analysts, Testers, Team leads, Architects, Developers and a Project Manager. Being a project manager and/or a team lead you should be well versed with their capabilities. You will have to define on paper whether a resource is of a senior or junior level in terms of his/her Dynamics CRM capability. Also within their capabilities, you will have to well define what they can do and how well they can do. For example one of your senior developers is very good in custom Dotnet programming. So you can utilise his/her expertise to build plugins and custom workflow activities. On the other hand one of your resources might be least experience in CRM 2011 but a good Business Intelligence expert. You can utilize his/her capability in developing custom SSRS reports for CRM 2011.

In estimations, you will have to breakdown work into broader tasks like requirements gathering, solution design, documentation, entity creation (which includes attributes, form layout, views), JScript (or any web resources), plugins, workflows (including any custom workflow activities), setting up the general navigation (which includes sitemap, icons and ribbon button customizations), SSRS Reports, integration (if there are any integrations with SharePoint, ERP or any third party applications), testing, SIT, UAT and Production Deployment (including data migration). All these will fall under various stages of your software development lifecycle. Your project will start with requirements gathering and solution design. Then the development will begin, followed by testing. This will lead to SIT, UAT and finally deployment to production.

Then under each you will have to breakdown into sub tasks. For example let's say you have 25 JScripts, 30 Plugins, 60 Workflows, 120 Reports, etc. Now each of these sub tasks should be categorized into 3 types: Simple, Medium or Complex. These types define the developer/BA/Tester man hours/days effort. Like a Simple report should take 4 hours, medium report should take 1 day and a complex report should take 2 days. Same way a Simple plugin should take 1 day, medium plugin should take 1.5 days and a complex plugin should take 3 days. It all depends on your requirements and the quality of developers you have.

Apart from development, you have to provide time for Business Analysts for requirements gathering, time for a Solution Architects to design the system, time for Testers to test the whole development and then time for SIT, UAT and Production Deployment. Rule of thumb is 35% of total development time should be added for testing. One of the most important areas in any enterprise level CRM 2011 project will be data migration. There is hardly ever a project without data migration. There should be sufficient time allocated for data migration testing and finally the actual migration.

Once you have no. of days and no. of hours for the above, add all and this is your final estimation. Add 10-20% contingency time on top and you will get final estimation. Once the development starts then you can assign simple, medium and complex tasks to developers based on their skill level and understanding.

All the above is for an enterprise level Microsoft Dynamics CRM 2011 project which will have all the stages and a proper software development lifecycle. For small to medium CRM projects some of the above stages might not exist.
 
I hope this blog about 'Quick, Overall & High-Level Estimations for Enterprise Level Microsoft Dynamics CRM 2011 Implementation' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM Market in Australia

There are many times when Dynamics CRM professionals from all across the globe have asked me my view points on the Dynamics CRM market in Australia. The queries come in different forms of questions like:

  • Is it possible for an experienced person like me (in Microsoft Dynamics CRM) to get a job in Australia
  • Being a Microsoft Dynamics CRM Business Analyst can I immigrate to Australia
  • What is the market in Australia like for Microsoft Dynamics CRM developer
  • Are there many companies using Microsoft Dynamics CRM in Australia

In this very brief and precise blog I will try to answer the questions above. My answers are based on my experiences as a Microsoft Dynamics CRM Solutions Architect working in Australia. Most of my career I have worked in Australia. Currently I am working for NEC in the Melbourne office. I have worked in different companies and different places. Within Australia I have worked in Sydney, Perth, Hobart, Canberra, Brisbane and Melbourne. Prior to my current work in Melbourne I was working in Singapore for 2 years. This blog is for the benefit for all the Microsoft Dynamics CRM professionals who would like to work in Australia.

Coming to the topic at hand, "Microsoft Dynamics CRM" in Australia. Australian economy is very good as compared to its counterpart economies like US, UK and Germany. Australian economy is going "OK" because it is a small economy. As compared to many developed economies, Australian population and its GDP are very small. Having a small population and hence a small Dynamics CRM workforce has its own advantages and dis-advantages. For companies it becomes very hard to find the right skill set. This in turn is good for Microsoft Dynamics CRM professionals as they can demand high wages.

MS CRM in Australia is used mostly by small to mid-size customers. There are few large scale or enterprise level Dynamics CRM projects. It is very rare to see Microsoft Dynamics CRM projects which are more than AUD 15 Million. There are lots of small to medium scale projects in Dynamics CRM. 

There are many technology companies providing Microsoft Dynamics CRM consultancy and services in Australia. Among these major players are:
The market for Dynamics CRM architects and consultants is good, but again the overall jobs advertised are decreasing by month (as per statistics). If you are a good Dynamics CRM Architect or CRM consultant who has lots of experience in third party integration then you are in demand. Also if you are an all-rounder Dynamics CRM expert having experience in almost all the facets of customizing CRM/xRM, then you are in demand. If you are a top end Microsoft Dynamics CRM business analyst with good communication skills, you are preferred. Any Microsoft Dynamics CRM pre-sales experience is very much in demand.

Overall companies here prefer local candidates as the costs and time associated with overseas candidates are very high. If a company cannot find any good candidates in Microsoft Dynamics CRM, they train someone in house.

If you are an outsider and want to work in Australia in Microsoft Dynamics CRM, then the options are limited. Australia till last year was open to work permits and immigration. As of now both are greatly reduced. First try the immigration route, if applicable. Australia has points based immigration system. As an immigrant and having experience in Dynamics CRM, it is very easy to land in a good job.

Companies now-a-days prefer the path of work permit if right calibre resources are not available within the country. If you are not currently in Australia and are working as a Microsoft Dynamics CRM professional elsewhere, then try securing a job first. Try to find suitable roles in job portals. The most widely used job site is http://www.seek.com.au. Almost every company will advertises their Microsoft Dynamics CRM jobs on this site. You can apply for jobs where a job specification doesn't specify that "only local candidates need apply". So I would suggest the easy way would be to look for jobs and apply to them. If the companies don't find local people, then you might get lucky. You never know, a company can be eager to sponsor you.

If you pass the company interviews and the company is willing to hire you, then you can negotiate your salary and relocation. Companies are not giving much relocation assistance. They will definitely cover visa and air tickets cost, but nothing else. This is mostly the case but again there are companies which would be willing to pay part or full relocation depending on your calibre and the requirement.

I hope this blog about 'Microsoft Dynamics CRM Market in Australia' was informative. Please feel free to leave your comments. 

Wednesday 31 October 2012

Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Exchange Server Failure

The process to restore a Microsoft Exchange Server computer that is used by Microsoft Dynamics CRM depends on the other uses of that instance of Exchange Server. Except for the forward mailbox, Microsoft Dynamics CRM does not directly use Exchange Server mailboxes.

Note: Installing the E-mail Router on a computer that is running Exchange Server is not required.

To restore Exchange Server in a Microsoft Dynamics CRM environment, follow these steps:

  • Restore Exchange Server.
  • If the E-mail Router was installed on the computer that is running Exchange Server, reinstall the E-mail Router.
  • Restore the Microsoft.Crm.Tools.EmailAgent.xml file. By default, this file is located in the Drive:\Program Files\Microsoft CRM Email\Service folder. If this file is not available, you must reconfigure the profiles, settings, users, queue, and forward-mailbox information by running the E-mail Router Configuration Manager.
My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Exchange Server Failure' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Active Directory Failure

In most environments, it is highly unlikely that Active Directory will fail on its own, because more than one Active Directory domain controller should be installed. 

To recover from a failed domain controller, follow these steps:

  • Reinstall the Windows Server 2003 or Windows Server 2008 operating system.
  • Perform a system state restore.

Make sure that you have a method for recovering from an Active Directory failure. Regardless of the size of your environment, you should consider having multiple domain controllers with regular backups of the system state. If your backups are not current, any data that belong to Microsoft Dynamics CRM objects in Active Directory will be orphaned in SQL Server and therefore will be unrecoverable. Any changes that are made in Microsoft Dynamics CRM, such as adding new Microsoft Dynamics CRM users or queues, requires that Active Directory is backed up immediately after the change.

One major problem can occur with Active Directory that stops Microsoft Dynamics CRM from functioning. If an administrator unintentionally deletes the organizational unit (OU) that corresponds to a Microsoft Dynamics CRM deployment, it becomes inoperable. Similarly, if any of the OU security groups that are created by Microsoft Dynamics CRM are deleted (such as PrivUserGroup, ReportingGroup, PrivReportingGroup, SQLAccessGroup, or UserGroup), Microsoft Dynamics CRM will no longer function correctly. In either of these events, an authoritative restore of Active Directory restores the deleted OU, and security groups, to their original state.


My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Active Directory Failure' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Outlook Failure

Microsoft Dynamics CRM for Outlook failure recovery


Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access includes functionality that uses Microsoft SQL Server 2005 Express Edition. This enables Microsoft Dynamics CRM users to work offline with data synchronized to SQL Server when Microsoft Dynamics CRM for Outlook with Offline Access is brought online again.

In some cases, Microsoft Dynamics CRM users may want to back up the local SQL Server 2005 Express Edition database. This is especially useful when Microsoft Dynamics CRM users are offline for prolonged periods. The following table indicates different methods that can be used for backing up Microsoft Dynamics CRM for Outlook with Offline Access.

Backup Method:
Offline backup
What to Back Up for Microsoft Dynamics CRM:
Contents of Microsoft Dynamics CRM data directory. Default location is:
SystemDrive:\Documents and Settings\UserName\Application Data\Microsoft\MSCRM\Data
On Windows Vista, the default location is:
SystemDrive:\Users\UserName\AppData\Roaming\Microsoft\MSCRM\Data
Comments:
Before you start the backup, make sure that the SQL Server (CRM) service is stopped. Restart the service after the backup is complete.

Backup Method:
Online backup using Microsoft tools
What to Back Up for Microsoft Dynamics CRM:
MSCRM_MSDE.mdf
MSCRM_MSDE_log.LDF
Comments:
Use the Osql.exe tool that is provided with Microsoft Office Server Extensions.

Backup Method:
Online backup using non-Microsoft tools
What to Back Up for Microsoft Dynamics CRM:
MSCRM_MSDE.mdf
MSCRM_MSDE_log.LDF
Comments:
Look for tools that are compatible with SQL Server 2005 Express Edition.

If there is a problem with Microsoft Dynamics CRM for Outlook with Offline Access before the user can reconnect to the server, the backup can be used to restore Microsoft Dynamics CRM functionality to the client. Outlook should be in offline mode before you restore the backup. When restored, you can then connect to the Microsoft Dynamics CRM Server (online mode). The data not already on the server will be transferred to the server from the client. Be careful when reconnecting to the server. If you restore from an outdated backup, the existing data on the server may have subsequently changed. However, neither SQL Server 2005 Express Edition nor SQL Server recognizes this fact. Therefore you run the risk of overwriting current data on the server by using older data from the offline client backup.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Outlook Failure' was informative. Please feel free to leave your comments.

Sunday 30 September 2012

Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Microsoft Dynamics CRM Server 2011 Failure

To understand the failure-recovery procedures, you must examine several different scenarios to learn how restoration occurs in each case. For the scenario in this blog, total server failure is assumed. The following scenario contains information that shows the steps to ensure successful recovery for Microsoft Dynamics CRM Server 2011 Failure.

Most of the Microsoft Dynamics CRM configuration information is stored on the computer that is running SQL Server. Therefore, the information can be recovered if all, or part, of Microsoft Dynamics CRM Server 2011 fails. Registry entries on the Microsoft Dynamics CRM Server 2011 are recovered when you run repair or reinstall processes for the Microsoft Dynamics CRM Server 2011 and Microsoft Dynamics CRM 2011 Connector for SQL Server Reporting Services.

We recommend that you keep a record of your current Microsoft Dynamics CRM update rollup level. Therefore, if failure recovery is required, the appropriate update rollup can be reapplied.

If the computer that is running Microsoft Dynamics CRM Server 2011 fails, follow these steps:
  1. Install the operating system on another server and join the same domain as the computer that is running SQL Server.
  2. Install Microsoft Dynamics CRM Server 2011. During Setup, you must select Connect to, and if necessary, upgrade an existing deployment when you are prompted. If Microsoft Dynamics CRM 2011 Connector for SQL Server Reporting Services was also installed on the computer that failed, install the Microsoft Dynamics CRM 2011 Connector for SQL Server Reporting Services after Microsoft Dynamics CRM Server 2011 is completed.
  3. If the ISV.config and web.config files have been changed from their default settings, restore these files from backup.
Publish all customizations.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: Microsoft Dynamics CRM Server 2011 Failure' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: SQL Server Failure

To understand the failure-recovery procedures, you must examine several different scenarios to learn how restoration occurs in each case. For the scenario in this blog, total server failure is assumed. The following scenario contains information that shows the steps to ensure successful recovery for SQL Server failure.

If the computer that is running Microsoft SQL Server fails, you must restore the databases from backup, and then reassociate them with the Microsoft Dynamics CRM deployment.

To recover from this failure, follow these steps:
  1. Install Windows Server 2008 and make sure that the computer is in the same domain as the Microsoft Dynamics CRM Server 2011. In addition, you should use the same database name and disk structure. If you change either of these, you must take additional steps to correctly restore the SQL Server databases.
  2. Install SQL Server.
  3. If you have a valid backup of the master database, restore that backup.
  4. Restore the msdb database.
  5. Restore the MSCRM_CONFIG and OrganizationName_MSCRM databases.
  6. If Microsoft SQL Server Reporting Services and the Microsoft Dynamics CRM 2011 Connector for SQL Server Reporting Services are also installed on the instance of SQL Server, restore the ReportServer and ReportServertempDB databases.
  7. If you restored the MSCRM_CONFIG database, you must run Microsoft Dynamics CRM Server Setup and use the Connect to existing databases option on the Specify Deployment Options page. If you did not restore the MSCRM_CONFIG database and the database is functioning correctly, you can reconnect the organization database to the system. To do this, in Deployment Manager right-click the organization and select Disable, right-click the organization again, click Edit Organization, and then change the SQL Server value in the wizard.
This scenario is a worst-case situation, that is, total failure of the computer that is running SQL Server. In other circumstances, such as the failure of a disk, you may only have to restore a single database to recover the environment.

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Failure Recovery for Scenario: SQL Server Failure' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 - Microsoft Dynamics CRM Editions and Licensing

Microsoft Dynamics CRM offers editions that cover implementations for small, to mid-level, to even very large organizations.

Editions for On-premises Deployments

  • Microsoft Dynamics CRM Server 2011. There is no user limit for this edition. Additional features include support for multiple organizations, multiple server instances, and separate role-based service installation. Role-based services let you increase performance by installing component services on different computers.
  • Microsoft Dynamics CRM Workgroup Server 2011. This edition is limited to five, or fewer, users. This version is limited to a single organization and a single computer that is running Microsoft Dynamics CRM Server 2011.

Licensing

A Microsoft Dynamics CRM deployment operates by using a single product key. Microsoft Dynamics CRM 2011 does not require additional product keys to be added when changes are made, such as adding a client access license (CAL). The single product key contains the Microsoft Dynamics CRM version, server license, and the CALs.

You can view and upgrade a license in Deployment Manager. Deployment Manager is a Microsoft Management Console (MMC) snap-in that system administrators can use to manage organizations, servers, and licenses for deployments of Microsoft Dynamics CRM.

Client Access License Types


You can view and modify client access license types for each user in the Users area of the Settings area in the Microsoft Dynamics CRM Web client.

Microsoft Dynamics CRM Online


With Microsoft Dynamics CRM Online, you get powerful CRM capabilities and features delivered as a cloud service from Microsoft, providing instant-on, anywhere access, and predictable pay-as-you-go pricing.


My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Microsoft Dynamics CRM Editions and Licensing' was informative. Please feel free to leave your comments.

Wednesday 29 August 2012

Microsoft Dynamics CRM 2011 - Microsoft Dynamics CRM E-mail Router Hardware Requirements

The following lists the minimum and recommended hardware requirements for Microsoft Dynamics CRM 2011 E-mail Router.

Component:
Processor (32-bit)
*Minimum: 750-MHz CPU or comparable
*Recommended: Multi-core 1.8-GHz CPU or higher

Component: Processor (64-bit)
*Minimum: x64 architecture or compatible 1.5 GHz processor
*Recommended: Multi-core x64 architecture 2GHz CPU or higher such as AMD Opteron or Intel Xeon systems

Component: Memory
*Minimum: 1-GB RAM
*Recommended: 2-GB RAM or more

Component: Hard disk
*Minimum: 100 MB of available hard disk space
*Recommended: 100 MB of available hard disk space

*Actual requirements and product functionality may vary based on your system configuration and operating system.
 

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Microsoft Dynamics CRM E-mail Router Hardware Requirements' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 - Minimum and Recommended Hardware Requirements

The following lists the minimum and recommended hardware requirements for Microsoft Dynamics CRM Server 2011 running in a Full Server configuration. These requirements assume that additional components such as Microsoft SQL Server, Microsoft SQL Server Reporting Services, SharePoint, or Microsoft Exchange Server are not installed or running on the system.

Component:
Processor
*Minimum: x64 architecture or compatible dual-core 1.5 GHz processor
*Recommended: Quad-core x64 architecture 2 GHz CPU or higher such as AMD Opteron or Intel Xeon systems

Component: Memory 
*Minimum: 2-GB RAM
*Recommended: 8-GB RAM or more

Component: Hard disk 
*Minimum: 10 GB of available hard disk space
Note: Computers with more than 16GB of RAM will require more disk space for paging, hibernation, and dump files.
*Recommended: 40 GB or more of available hard disk space
Note: Computers with more than 16GB of RAM will require more disk space for paging, hibernation, and dump files.
* Actual requirements and product functionality may vary based on your system configuration and operating system.

The minimum and recommended requirements are based on 320-user load simulation tests.


My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - Minimum and Recommended Hardware Requirements' was informative. Please feel free to leave your comments.

Microsoft Dynamics CRM 2011 - How Field Security Can Be Used to Control Access to Field Values

In Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online, you use field-level security to restrict access to high business impact fields to specific users and teams. For example, you use this to enable only certain users to read or update the credit score for a customer. For this release, field security can be applied to custom fields only.

The following steps describe how to restrict access to a field:
  • Create a field security profile.
  • Associate users or teams with the profile.
  • Add specific field permissions, such as Create, Update or Read to the profile.
The following diagram shows the interaction between role-based security, record-based security, and field-based security.

Field level security administration
Field level security administration
Role-based security lets you see a specific entity type, record-based security lets you see individual records, and field-level security lets you see specific fields.

Which Security Roles Allow You to See Secured Fields?

The System Administrator field security profile gives full access to all secured fields in Microsoft Dynamics CRM. By default, all users who have the System Administrator security role have this profile. This profile is system managed and cannot be updated or deleted.

How Do Secured Fields Behave for Retrieve and RetrieveMultiple?

When you call the Retrieve or RetrieveMultiple methods or messages, Microsoft Dynamics CRM evaluates if the caller and the impersonated user have access to each retrieved record (this is the regular security process) and each secured field. The call does not throw an exception if the criteria contain secured fields for which the caller does not have access. Instead, null values are returned for secured fields if they are part of the output column set.

The following describes more about the retrieve multiple behaviors for secured fields.

When a Secured Attribute is in the Column Set

If the caller (or impersonated user) does not have read access to the secured fields that are included in a column set, the value returns as null. You cannot tell the difference between a returned null value caused by no data or caused by insufficient access.

When a Secured Attribute is in the Filter Condition

If the caller (or impersonated user) does not have access to the secured fields that are included in the filter criteria, the field value is substituted with null during the evaluation of the filter.

In the following table, the caller has access to attributes that are in plain text. The caller does not have access to attributes that are in Bold or Italic format.

Record: 1
Name: A
Description: AAA   
CanbeContacted: True 

Record: 2  
Name: B
Description: BBB   
CanbeContacted: False 

Record: 3  
Name: C    
Description: CCC   
CanbeContacted: True 

Record: 4  
Name: D 
Description: DDD   
CanbeContacted: Null 

Record: 5
Name: E
Description: EEE   
CanbeContacted: Null

When the filter is CanbeContacted == True, only record one is returned.

When the filter is IsNULL (CanbeContacted), records 3 and 4 are returned. Since record 3 is hidden from the user, it is treated as null during condition evaluation and will be evaluated as True for ISNull.

When Aggregating on Secured Attributes

Secured values are substituted with a null value, so normal SQL aggregation behavior applies.

When Grouping on Secured Attributes

If the caller (or impersonated user) does not have access to the attribute used for grouping, the value is treated as null and the results are grouped together with all null values.

In the following example, the caller has access to attributes that are in plain text. Bold indicates no access to attributes. Italics indicate a record for which the caller does not have read access.

Name: A     
Description: AAA    
Number of orders: 1    
State: WA

Name: B   
Description: BBB
Number of orders:
State: WA

Name: C   
Description: CCC
Number of orders: 4   
State: CA

Name: D     
Description: DDD 
Number of orders: 3
State: MA

Name: E     
Description: EEE    
Number of orders: 0    
State: CA

Name: F     
Description: FFF    
Number of orders: 0    
State: WA

Name: G     
Description: GGG    
Number of orders: 2    
State: CA

Select State, Total(orders) Group by (STATE) results in the following:
  • WA–5
  • CA–4
  • null–2
When Ordering on Secured Attributes

If the caller (or impersonated user) does not have access to secured fields that are included in an order by condition, the values will be treated as if they are null.

In the following example, the caller has access to attributes that are in plain text. Bold indicates no access to attributes, and Italics indicate a record for which the caller does not have read access.

Name: A
Description: AAA
CanbeContacted: True

Name: B
Description: BBB
CanbeContacted: False

Name: C
Description: CCC
CanbeContacted: True

Name: D
Description: DDD
CanbeContacted: Null

Name: E
Description: EEE
CanbeContacted: Null

Name: F
Description: FFF
CanbeContacted: True

Name: G
Description: Null
CanbeContacted: True

Select Name order by Description ascending results in the following:

{G,E,C},A, B, D, will be returned.

How Do Secured Fields Behave for Create or Update?

A programmer may build a client that uses Create and Update methods that interact with secured fields. When you call the Create or Update method, passing data for secured fields and the caller does not have sufficient permissions, an exception is thrown.

How Do Secured Fields Behave When Records are Shared?

A user with access to a secured field in a record can choose to share it with another user or team. The user can only give the access that they have on the record. For example, to share the record and grant Update privileges, the user must have update privileges.

You can share a secured field on a particular record with Read and/or Update with a security principal (user or team).  The user or team members with whom the record was shared now have that type of secured field access only on the shared secured fields on only that particular record, even if the user or team member to whom it was shared does not have a field security profile that gives them access.

How Do Secured Fields Behave for Filtered Views?

An administrator secures a number of fields for access in the application and wants the fields not to be available in reports. This allows for maintaining the same set of reports for all users. Filtered views will not return data for the secured fields if the calling user does not have authorization for the fields. When no field security is applied for any of the view’s attributes, the filtered views return complete data.

How Do Secured Fields Behave for Offline Synchronization?

If you are using Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access, only the secured field values to which you have access replicate into the offline database. If you do not have access to the data, it is not saved offline. 

My above blog is based on Microsoft's Official information.
 
I hope this blog about 'Microsoft Dynamics CRM 2011 - How Field Security Can Be Used to Control Access to Field Values' was informative. Please feel free to leave your comments.

Friday 17 August 2012

Microsoft Dynamics CRM 2011 - I am featured on the Official Microsoft Tech Australia Facebook page for being a valued member of the Microsoft community

I am featured on the Official Microsoft Tech Australia Facebook page for being a valued member of the Microsoft community.


I am honoured and excited. You can check it out and leave your comments at https://www.facebook.com/msautech


I am featured on the Official Microsoft Tech Australia Facebook page

Please feel free to leave your comments.

Thursday 19 July 2012

Microsoft Dynamics CRM 2011 - Event Execution Pipeline

The Microsoft Dynamics CRM event processing subsystem executes plug-ins based on a message pipeline execution model. A user action in the Microsoft Dynamics CRM Web application or an SDK method call by a plug-in or other application results in a message being sent to the organization Web service. The message contains business entity information and core operation information. The message is passed through the event execution pipeline where it can be read or modified by the platform core operation and any registered plug-ins.

Note: While there are several Web services hosted by the Microsoft Dynamics CRM platform, only events triggered by the organization and OData endpoints can cause plug-ins to execute.

Architecture and Related Components


The following figure illustrates the overall architecture of the Microsoft Dynamics CRM platform with respect to both synchronous and asynchronous event processing.

Event Processing Architecture
Event Processing Architecture
The event execution pipeline processes events either synchronously or asynchronously. The platform core operation and any plug-ins registered for synchronous execution are executed immediately. Synchronous plug-ins that are registered for the event are executed in a well-defined order. Plug-ins registered for asynchronous execution are queued by the Asynchronous Queue Agent and executed at a later time by the asynchronous service.

Important: Regardless of whether a plug-in executes synchronously or asynchronously, there is a 2 minute time limit imposed on the execution of a (message) request. If the execution of your plug-in logic exceeds the time limit, a System.TimeoutException is thrown. If a plug-in needs more processing time than the 2 minute time limit, consider using a workflow or other background process to accomplish the intended task.

Pipeline Stages


The event pipeline is divided into multiple stages, of which 4 are available to register custom developed or 3rd party plug-ins. Multiple plug-ins that are registered in each stage can be further be ordered (ranked) within that stage during plug-in registration.

Event: Pre-Event 

Stage name: Pre-validation
Stage number: 10    
Description: Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage may execute outside the database transaction. The pre-validation stage occurs prior to security checks being performed to verify the calling or logged on user has the correct permissions to perform the intended operation.
 

Event: Pre-Event      
Stage name: Pre-operation      
Stage number: 20      
Description: Stage in the pipeline for plug-ins that are to execute before the main system operation. Plug-ins registered in this stage are executed within the database transaction. 

Event: Platform Core Operation      
Stage name: MainOperation     
Stage number: 30      
Description: In-transaction main operation of the system, such as create, update, delete, and so on. No custom plug-ins can be registered in this stage. For internal use only. 

Event: Post-Event      
Stage name: Post-operation      
Stage number: 40      
Description: Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage are executed within the database transaction. 

Event: Post-Event     
Stage name: Post-operation (Deprecated)     
Stage number: 50     
Description: Stage in the pipeline for plug-ins which are to execute after the main operation. Plug-ins registered in this stage may execute outside the database transaction. This stage only supports Microsoft Dynamics CRM 4.0 based plug-ins.

Message Processing


Whenever application code or a workflow invokes a Microsoft Dynamics CRM Web service method, a state change in the system occurs that raises an event. The information passed as a parameter to the Web service method is internally packaged up into a OrganizationRequest message and processed by the pipeline. The information in the OrganizationRequest message is passed to the first plug-in registered for that event where it can be read or modified before being passed to the next registered plug-in for that event and so on. Plug-ins receive the message information in the form of context that is passed to their Execute method. The message is also passed to the platform core operation.

Plug-in Registration


Plug-ins can be registered to execute before or after the core platform operation. Pre-event registered plug-ins receive the OrganizationRequest message first and can modify the message information before the message is passed to the core operation. After the core platform operation has completed, the message is then known as the OrganizationResponse. The response is passed to the registered post-event plug-ins. Post-event plug-ins have the opportunity to modify the message before a copy of the response is passed to any registered asynchronous plug-ins. Finally, the response is returned to the application or workflow that invoked the original Web service method call.

Because a single Microsoft Dynamics CRM server can host more than one organization, the execution pipeline is organization specific. There is a virtual pipeline for every organization. Plug-ins registered with the pipeline can only process business data for a single organization. A plug-in that is designed to work with multiple organizations must be registered with each organization's execution pipeline.

Note: In Microsoft Dynamics CRM 4.0, there existed a parent and a child pipeline. These pipelines have been consolidated into one pipeline for this release. A pre-event plug-in registered in the parent pipeline of Microsoft Dynamics CRM 4.0 is equivalent to registering in stage 10. A pre-event plug-in registered in the child pipeline of Microsoft Dynamics CRM 4.0 is equivalent to registering in stage 20.

Inclusion in Database Transactions


Plug-ins may or may not execute within the database transaction of the Microsoft Dynamics CRM platform. Whether a plug-in is part of the transaction is dependent on how the message request is processed by the pipeline. You can check if the plug-in is executing in-transaction by reading the IsInTransaction property inherited by IPluginExecutionContext that is passed to the plug-in. If a plug-in is executing in the database transaction and allows an exception to be passed back to the platform, the entire transaction will be rolled back. Stages 20 and 40 are guaranteed to be part of the database transaction while stage 10 and 50 may be part of the transaction.

Any registered plug-in that executes during the database transaction and that passes an exception back to the platform cancels the core operation. This results in a rollback of the core operation. In addition, any pre-event or post event registered plug-ins that have not yet executed and any workflow that is triggered by the same event that the plug-in was registered for will not execute.

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics CRM 2011 - Event Execution Pipeline' was informative. Please feel free to leave your comments.

Friday 13 July 2012

Microsoft Dynamics CRM 2011 - Introduction to Windows Azure Integration

Microsoft Dynamics CRM 2011 has been integrated with the Windows Azure platform by coupling the Microsoft Dynamics CRM event execution pipeline to the Windows Azure Service Bus in the cloud. In essence, the Microsoft Dynamics CRM pipeline connects to the Windows Azure Service Bus enabling the data that has been processed as part of the current Microsoft Dynamics CRM operation to be posted to the bus. Windows Azure Service Bus solutions that are “CRM aware” can listen for and read the data that is posted on the service bus by Microsoft Dynamics CRM. The posted data is stored in a RemoteExecutionContext class instance that is an extended version of IExecutionContext passed at run-time to Microsoft Dynamics CRM asynchronous plug-ins. In addition to information on the requested operation that was processed by Microsoft Dynamics CRM, this class adds a OperationId property and a OperationCreatedOn property, which contain the same data as the AsyncOperationId and CreatedOn attributes of the related System Job (AsyncOperation) record. These additional properties facilitate sequencing and duplicate detection if the Windows Azure Service Bus post must be retried.

This integration between Microsoft Dynamics CRM 2011 and the Windows Azure platform provides a secure channel for communicating Microsoft Dynamics CRM run-time data to external cloud based line of business applications. This capability is especially useful in keeping disparate CRM systems or other database servers synchronized with Microsoft Dynamics CRM Online business data changes.

 

Identifying Key Elements of the Integration


The key elements that implement the integration between Microsoft Dynamics CRM 2011 and the Windows Azure platform are as follows.

Asynchronous Service 
The asynchronous service is responsible for posting the Microsoft Dynamics CRM remote execution context. Each post is performed by a system job of the asynchronous service. A user can view the status of each system job using the Microsoft Dynamics CRM Web application.
Asynchronous Plug-ins 
There are two kinds of asynchronous plug-ins supported by the integration feature: out-of-box (OOB) and custom. Synchronous plug-ins are not supported.
An Azure aware plug-in is provided with Microsoft Dynamics CRM 2011. This OOB plug-in executes in full trust with the Microsoft Dynamics CRM platform. When registered with Microsoft Dynamics CRM, the plug-in can notify the asynchronous service to post the current request’s context. A developer needs to register a step on this plug-in that identifies the target message and entity in order to enable the service bus posting functionality.
You can also write your own custom plug-in that is “Windows Azure aware”. The custom plug-in executes in partial trust mode in the sandbox and can call any Microsoft Dynamics CRM SDK methods. For a custom plug-in to initiate posting the Microsoft Dynamics CRM context to the bus, the plug-in code must include some standard lines of code that notifies the asynchronous service to post the request context. This code makes the plug-in “Windows Azure aware”.
Custom Workflow Activities 
Custom workflow activities can be written to post the current request’s data context to the Windows Azure Service Bus.
Windows Azure Service Bus 
The service bus relays the remote execution context between Microsoft Dynamics CRM 2011 and Windows Azure Service Bus solution listeners. The Access Control Service (ACS) manages claims based authentication security.
Windows Azure Solution 
For the CRM-Azure integration feature to work there must be at least one solution in an Windows Azure Service Bus solution account, where the solution contains one or more service endpoints. For a non-queued endpoint contract, a listener that is “CRM aware” must be actively listening on the endpoint for the Microsoft Dynamics CRM request on the service bus. For a queued endpoint contract, a listener does not have to be actively listening. A listener is made “CRM aware” by linking it to the Microsoft.Xrm.Sdk assembly so that type RemoteExecutionContext is defined.
The solution rules must be configured to allow the Microsoft Dynamics CRM 2011 remote execution context to be posted to the service bus. To enable this posting, ACS needs to recognize the Microsoft Dynamics CRM deployment as a supported issuer.
Important: To develop a solution listener for Windows Azure platform, you need to install the Windows Azure SDK on your development computer.

Describing a Microsoft Dynamics CRM to Service Bus Scenario


Let us now identify a scenario that implements those integration components identified previously. As a pre-requisite, ACS has been configured to recognize Microsoft Dynamics CRM as the supported issuer and the Windows Azure Service Bus solution configured with rules to allow Microsoft Dynamics CRM to post to the endpoint on which the listener is listening.

The following diagram shows the physical elements that make up the scenario.

Microsoft Dynamics CRM to Service Bus Scenario
Microsoft Dynamics CRM to Service Bus Scenario

The sequence of events as identified in this diagram are as follows:
  1. A listener is registered on a Windows Azure Service Bus solution endpoint and begins actively listening for the Microsoft Dynamics CRM 2011 remote execution context on the service bus.
  2. A user performs some operation in Microsoft Dynamics CRM 2011 that triggers execution of the registered OOB (out of the box) plug-in or a custom Windows Azure aware plug-in. The plug-in initiates a post, through an asynchronous service system job, of the current request context to the service bus.
  3. ACS authenticates the claims posted by Microsoft Dynamics CRM. The service bus then relays the remote execution context to the listener. The listener processes the context information and performs some business related task with that information. The asynchronous service is notified, by the service bus, of a successful post and sets the related system job to a completed status.

Establishing a Contract between Microsoft Dynamics CRM and a a Windows Azure Solution


For each solution endpoint, you configure a contract that defines the handling of these remote execution context ‘messages’ on the service bus and the security that should be used on that endpoint. Service bus messages are received at an endpoint using a queued contract, a one-way contract, a two-way contract, or a REST contract.

Queued:
A queued contract, also known as a “message buffer”, provides a message queue in the cloud where messages are stored in the cloud. With a queued contract, a listener does not have to be actively listening for messages on the endpoint. However, the queued messages and the endpoint will be removed from the service bus if not used for a pre-configured length of time that typically is less than 10 minutes. For queues, there is a destructive read and a non-destructive read. A destructive read reads an available message from the queue and the message is removed. A non-destructive read does not remove a message from the queue

One-way:
A one-way contract requires an active listener. If there is no active listener on an endpoint, the Microsoft Dynamics CRM post to the service bus fails. Microsoft Dynamics CRM will retry the post in exponentially larger and larger time spans until the asynchronous system job that is posting the request is eventually aborted and its status is set to Failed.

Two-way:
A two-way contract is similar to a one-way contract except that a string value can be returned from the listener to Microsoft Dynamics CRM.

REST:
A REST contract is similar to a two-way contract on a REST endpoint.

Identifying the kind of security a contract uses is part of the contract’s configuration. A contract can use Transport security, which uses Secure Socket Layer (https).

Claims authentication is used for secure access to the service bus. However, Microsoft Dynamics CRM and the service bus use different claims implementations. The claim used to authenticate to the service bus is generated within Microsoft Dynamics CRM and signed by the AppFabricIssuer certificate specified in the Microsoft Dynamics CRM configuration database.

Management and Notification of Run-time Errors


If an error occurred after a post was attempted to the service bus, check the status of the related system job in the Microsoft Dynamics CRM Web application for more information on the error. If the service bus is down or a listener/endpoint is not available, the current message being processed in Microsoft Dynamics CRM will not be posted to the bus. The asynchronous service will continue to try to post the message in an exponential pattern where it will try to post frequently at first and then at longer and longer intervals. For an internal Microsoft Dynamics CRM error, message posts are not attempted. For an external service bus or network error, the related system job will be in a Wait state.

My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics CRM 2011 - Introduction to Windows Azure Integration' was informative. Please feel free to leave your comments.

Thursday 12 July 2012

Microsoft Dynamics CRM 2011 - Process Architecture

The process management system in Microsoft Dynamics CRM includes the Microsoft Dynamics CRM SDK, plug-ins, forms, and other components.

Process Architecture Diagram

The following diagram illustrates the high-level system architecture for Microsoft Dynamics CRM, and highlights parts of the system that are specific to processes.

This diagram shows the process architecture of Microsoft Dynamics CRM including the internal components, the external components, the infrastructure, and the data.

Internal Components. The internal components that support the Microsoft Dynamics CRM process programming model include Web services, shared platform, and business logic. The shared platform consists of common Microsoft Dynamics CRM components that provide registration, metadata cache, and data access services. Business logic contains the implementation of business logic for Microsoft Dynamics CRM business entities.

External Components. The external components are as follows:

  • Windows Workflow Foundation object model, which contains a set of classes used to create and parse workflow process definitions in XAML format.
  • Windows Workflow Foundation execution, which contains a set of classes used to execute workflow processes.
Process Infrastructure. The Microsoft Dynamics CRM process infrastructure consists of the following components:
  • Process entity model, which contains a set of classes that use the Windows Workflow Foundation object model and expose Microsoft Dynamics CRM workflow activities.
  • Process business logic, which implements business logic for process-specific entities.
  • Process execution, which provides workflow execution services, such as workflow hosting and persistence.
Process Data. The Microsoft Dynamics CRM process programming model is supported by the following data:
  • Business data, which contains information associated with Microsoft Dynamics CRM entities.
  • Process configuration data, which includes workflow process definitions, compiled workflow processes, and workflow process settings.
  • Process runtime data, which is required to execute workflow processes and implement workflow process features, such as persistence and notifications. 

Process and the Unified Event Model

 

Microsoft Dynamics CRM uses a unified event model that is used in both plug-ins (callouts) and in processes. This event processing subsystem adds more flexibility to the execution of processes and plug-ins by introducing the pipeline execution model.

Using this model, processes and plug-ins are executed based on their registration, message type, and a predefined set of configurable parameters. The core platform operations take part in the execution sequence to form a much more reliable and extensible execution model.

Process Life Cycle

 

The life cycle of a process describes the state transitions from creation through execution. A process can be in one of the following states: Ready, Suspended, Locked, and Completed. The events that occur throughout the lifetime of the process cause a transition from one state to another.

Workflows

The workflow life cycle is as follows:

  1. When you create a workflow, it is in the Draft state. You must activate the workflow before it can run. When you activate a workflow, it subscribes to specific Microsoft Dynamics CRM events. When these events are triggered in the platform, a snapshot of the workflow dependencies and input parameters are created and a new asynchronous operation is added to the asynchronous service queue manager. The asynchronous operation represents a workflow execution job and awaits execution in the queue in the Ready state. 
  2. When the asynchronous operation is processed, a workflow instance, associated with this operation, is created by the Windows Workflow Foundation run-time engine and the state of it is changed from Ready to Locked.
  3. The asynchronous operation is updated with the workflow instance state status on each transition. When the asynchronous operation is blocked, the Windows Workflow Foundation run-time engine puts the workflow instance into the Suspended state and removes it from memory. When the Suspended state conditions are satisfied, the workflow instance is loaded back into memory.
  4. The workflow execution resumes by putting the workflow instance into a Ready state and then into a Locked state. In the simple scenario, the workflow instance moves to a Completed state when all workflow activities have completed successfully.
The state of asynchronous operations can also be changed by the user. For example, an asynchronous operation that is in a Suspended state can explicitly be restarted by the user.
Dialogs

A dialog life cycle is as follows:

  1. When you create a dialog, it is in the Draft state. You must activate the dialog before it can be run. A dialog can be run from its primary entity form and grid, or directly by using the URL of the dialog.
  2. Every time that you run a dialog, a process session (dialog session) instance is created for the dialog. As you progress with running the dialog, the dialog session entity is updated with the actions performed during the running of the dialog.
  3. If you completed running the dialog successfully, the corresponding dialog session record is created with a Complete status. If you canceled the dialog without completing it, the corresponding dialog session record is created with an Incomplete status.

Process and the Asynchronous Service: For Workflows Only

 

The asynchronous service enables you to execute, monitor, and manage various long-running operations, such as bulk import, bulk mail, and workflow processes. To improve performance, scalability, and reliability of Microsoft Dynamics CRM, these operations are run asynchronously. This means that a requested operation is not processed instantly, but added to a queue and processed by Microsoft Dynamics CRM at an appropriate time.

When an event is raised in the Microsoft Dynamics CRM platform pipeline, all workflows that are associated with the event are executed by the asynchronous service. The workflow event handlers are added to the asynchronous queue and processed according to the event execution order.

Process Persistence and Shutdown: For Workflows Only

 

A workflow can be a long-running business operation that might take hours, weeks, or months to be completed. It can be effectively idle for long periods of time waiting for input from users or other systems.

To improve performance, scalability, and reliability of Microsoft Dynamics CRM, long-running operations such as workflows use the asynchronous service.

The asynchronous service, as the host of the Windows Workflow Foundation runtime engine, cannot always cache and keep active all objects that accumulate during continued workflow activity. When certain conditions, such as restart or shutdown occur when a workflow is running, the workflow runtime engine uses a persistence service to save the state of the workflow instance onto the disk. The persistence service is also invoked when other conditions occur, such as when a workflow becomes idle and is waiting for some external event to occur. Persisting these idle workflow instances saves memory and greatly increases scalability. If a server that is running the asynchronous service is shut down or if the workflow crashes during execution, the workflow can be restarted from its last persisted point after the server restarts. When the workflow is no longer idle, the state of the workflow instance is restored in memory to the state at the last persisted point. 


My above blog is based on Microsoft's Official information.

I hope this blog about 'Microsoft Dynamics CRM 2011 - Process Architecture' was informative. Please feel free to leave your comments.