Записки на лету

Сдал экзамен MB2-876 Extending Microsoft Dynamics CRM 2011

Недавно сдал экзамен MB2-876 Extending Microsoft Dynamics CRM 2011.

Те кому лень могут сразу качать дамп здесь и зубрить а дальше я, в кратце расскажу, что надо знать и по чему я готовился.

Дамп, имеет комментарии почти к каждому ответу, хотя не все мне понятны. Я брал каждый вопрос из дампа и старался прорабатывать каждый вариант ответа правильный и неправильный.

Очень помогли заметки при подготовке MB2-876 Exam Study Notes некоего Jason Weibel, которые он выложил в своем блоге Microsoft CRM Geek.

Что покрывает экзамен описано на странице экзамена в разделе Skills Measured.

Вот некоторые вещи, которые я выделил для себя на отдельном листе когда готовился к экзамену.


Для работы с Microsoft Dynamics CRM 2011 есть несколько библиотек: Microsoft.Crm.Sdk.Proxy.dll, Microsoft.Xrm.Sdk.dll, Microsoft.Xrm.Sdk.Workflow.dll, Microsoft.Crm.Tools.EmailProviders.dll, Microsoft.Xrm.Sdk.Deployment.dll, все остальное неймспейсы, поэтому когда спрашивают файл надо указывать файл.

Assembly name Description
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.
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.
Microsoft.Crm.Sdk.Messages Contains request and responses for business data model specific (non-core) messages.
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.
Microsoft.Xrm.Sdk Defines the data contracts for attribute types, interfaces for authoring plug-ins, and other general purpose xRM types and methods.
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.
Microsoft.Xrm.Sdk.Discovery Defines all classes required to communicate with the Discovery Service, including the service contract, all request/responses and supporting classes.
Microsoft.Xrm.Sdk.Messages Defines request/response classes for Create, Retrieve, Update, Delete, Associate , Disassociate, and the metadata classes.
Microsoft.Xrm.Sdk.Metadata Defines the data contracts for Microsoft Dynamics CRM metadata.
Microsoft.Xrm.Sdk.Query Defines query classes required to connect to Microsoft Dynamics CRM.
Microsoft.Xrm.Sdk.Workflow.dll Defines types and methods required to author a custom workflow activity.
Microsoft.Xrm.Sdk.Workflow Defines the attribute and dependency property classes required to author a custom workflow activity.
Microsoft.Xrm.Sdk.Workflow.Activities Defines the workflow activities that are used by the Microsoft Dynamics CRM workflow designer.
Microsoft.Xrm.Sdk.Workflow.Designers Defines a Microsoft Visual Studio designer for displaying a Microsoft Dynamics CRM workflow in Visual Studio.
Microsoft.Crm.Tools.EmailProviders.dll Defines methods and types needed for developing a custom email provider component for the Microsoft Dynamics CRM Email Router.
Microsoft.Crm.Tools.Email.Management Defines the email provider management types.
Microsoft.Crm.Tools.Email.Providers Defines the base class for a custom email provider and supporting types.
Microsoft.Xrm.Sdk.Deployment.dll Defines types and methods for interacting with the Deployment Web Service.
Microsoft.Xrm.Sdk.Deployment Defines the data contracts necessary to communicate with the Deployment Web Service.
Defines a helper class to generate a proxy for the Deployment Web Service.


IOrganizationService is the primary web service for accessing data and metadata in Microsoft Dynamics CRM 2011 is the Organization web service.
IDiscoveryService is a single Microsoft Dynamics CRM installation can host multiple organizations on multiple servers therefore it is important to specify which organizations need to be accessed. The Discovery Web service returns a list of the organization the specified user belongs to and the URL endpoint address for each organization.
Messages: Assign, Create, Delete, Merge, Retrieve, RetrieveMultiple, SetState, Update.
Stage name
Stage number
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.
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.
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.

Отличие REST и SOAP

REST and SOAP Endpoints
Developers can use JScript and Silverlight Web resources to access Microsoft Dynamics CRM data from inside the application. There are two web services available, each provides specific strengths. The following table describes the appropriate web service to use, depending on the task that you have to perform.
Task Web Service
Create, Retrieve, Update and Delete records. REST Endpoint
Associate and Disassociate records REST Endpoint
Assign Records SOAP Endpoint
Retrieve Metadata SOAP Endpoint
Execute Messages SOAP Endpoint

Both Web services rely on the authentication provided by the Microsoft Dynamics CRM application. They cannot be used by code that executes outside the context of the application and they are effectively limited to use within Silverlight, JScript libraries, or JScript that is included in Web Page (HTML)

Microsoft Dynamics CRM 2011 supports two authentication methods: Basic Claims Authentication and Active Directory Authentication.


File File extensions Type
Webpage (HTML) .htm, .html 1
Style Sheet (CSS) .css 2
Script (JScript) .js 3
Data (XML) .xml 4
Image (PNG) .png 5
Image (JPG) .jpg 6
Image (GIF) .gif 7
Silverlight (XAP) .xap 8
StyleSheet (XSL) .xsl, .xslt 9
Image (ICO) .ico 10


Типы полей

Не путайте тип даных и тип поля, например OptionSetValue это тип данных для поля Option Set.
When creating custom fields in Microsoft Dynamics CRM (CRM), the following data types are available to you as a customizer.
Single Line of Text – This is the simplest field type and is a string attribute.  The length can be defined between 1 and 4000 characters.  This field has special formatting if desired for storing Email, Text Area, Ticker Symbol, and Url.  Using email will create a mailto link for that field.  Ticker Symbol will provide a quote for the ticker entered into the field when the value is clicked.  Url will display a link to the value entered in the field.  Text Area can be displayed as more than one line on the form.
Option Set – This is commonly referred to as a pick list or drop down field.  A user is only allowed to select from the choices provided.  A “blank” value is acceptable.  A default value can also be defined.  NOTE: If you have an option set that will be used on other entities in your deployment, you will want to create a global option set for system consistency.
Two Options – This is similar to an option set but only contains two values, Zero (0) and One (1).  The display of those values can be changed to represent whatever you like. No (0) and Yes (1) are common display values for this field.  Another interesting note about this field is that it can be displayed on the form as a pick list, radio buttons, or check box.  The value is set in the form designer after the field is placed on the form.
Multiple Lines of Text – This field is similar to Single Line of Text, however, it can store much more data than Single Line of Text.  This field will be displayed as more than one line on the form.
Date and Time – This field stores date and time data.  You can choose to have both the Date and Time displayed or only the Date portion.
Lookup – This field represents a link to another entity.  It will create a 1:N relationship in the database with this field representing the “1” side of the relationship.
The fields below are different ways to store numerical values in CRM.  In all cases, you can set minimum and maximum values.  This is valuable if you want to constrain data entry to non-negative values or from 0 to 100 for example.  The minimum and maximum values are different for each data type and are set at the minimum and maximum range when the field is created.
Whole Number – This field allows you to store round (or whole) numbers, meaning no decimal points.  The whole number field has different types which can be selected for Duration (activity), Time Zone, and Language (multilingual support).
Floating Point Number – This field allows for numeric values with up to five (5) decimal points.  The precision of this field is arbitrary, which means it can be used to represent both very large numbers as well as very small numbers.
Decimal Number – This field stores numeric values with up to ten (10) decimal points.  The precision of this field is absolute.
Currency – This field is used to store monetary values.  Based on your currency settings, the correct currency symbol is also displayed such as the dollar sign or euro symbol.  It can also hold up to four (4) decimal points.

Роли безопасности

Create an entity instance.
Change entities instances.
Remove an entity instance.
View entities.
Associate a selected entity instance to another entity instance.
Append To
Associate another entity instance to this entity instance.
Give ownership of an entity instance to another user.
Give access to entity instances to another user and maintain ownership.
Assign a different parent to an entity instance.

Windows Azure

Что касается вопросов по Windows Azure то мы можем использовать AppFabric Service Bus для связи с облачными приложениями, соединяться можно с помощью Access Control Services (ACS) или Active Directory Federation Services 2.0 (ADFS) и это все.