• No results found

Microsoft Dynamics CRM 4.0 provides three web service APIs to access and manipulate application data. These services are:

 CRM Web Service (CrmService.asmx)

 Metadata Web Service (MetadataService.asmx)

 Discovery Web Service (DiscoveryService.asmx)

Microsoft also offers three assemblies that you can use to programmatically interact with Microsoft Dynamics CRM instead. These assemblies are:

 Microsoft.Crm.Sdk.dll

 Microsoft.Crm.SdkTypeProxy.dll

 Microsoft.Crm.Outlook.Sdk.dll

When developing assembly-based solutions, such as plug-ins and workflow assemblies, we recommend that you reference the API assemblies rather than using the web references. For web development applications, you can use either the Web Service Description Language (WSDL) or the assembly reference approach.

CrmWebService Web Service

The CrmWebService web service is the core API mechanism for programmatically interacting with all entities in Microsoft Dynamics CRM. It provides strongly typed access to all entities in Microsoft Dynamics CRM, including custom entities and attributes. This web service also allows execution of all supported operations, including those with built-in business logic and specialized operations. It provides valid WSDL that is dynamically generated on the server to include the latest customizations, and provides a single endpoint for your code.

Common Methods

The following six methods provide the basic create, read, update, and delete (CRUD) operations for entities, including custom entities.

Create – Creates a new record for a given entity.

Retrieve – Returns a single record based on the entity ID passed in.

RetrieveMultiple – Returns multiple records based on a query expression.

Update – Edits an existing record.

Delete – Removes a record.

Fetch – Returns multiple records based on a FetchXML query.

Execute Method

In addition to the common methods, the Execute method is provided to perform any business logic that is not addressed by the common methods. The Execute method executes a message that represents either a specialized method or specific business logic. Execute uses a message-based approach, and supports a message class hierarchy to group similar operations. It takes a message request class as a parameter and returns a message response class.

MetadataService Web Service

The metadata for Microsoft Dynamics CRM is stored in the SQL Server database tables. These tables contain the entity, attribute, and relationship definitions for each organization. This includes the metadata for your customizations. The MetadataService web service contains the messages that you use to read or write the definitions for all the entities in a Microsoft Dynamics CRM installation. It can also be used to build a client-side cache.

Use the MetadataService web service to:

 Create a custom entity.

 Retrieve the metadata for a specific entity, either system or custom.

 Retrieve, add, or update attributes for an entity.

 Create or delete relationships between two entities.

 Determine metadata changes and identify custom entities from all entities.

CrmDiscoveryService Web Service

The CrmDiscoveryService web service enables the caller to determine the correct organization and URL for their needs. Microsoft Dynamics CRM 4.0 is a multi-tenant environment; a single Microsoft

Dynamics CRM server can host multiple business organizations. Each time a server handles a web service method call, it could be for a different organization. Therefore, the web services must be notified of the target organization that a user is intending to reach. The CrmDiscoveryService web service enables your code to discover the CrmService and MetadataService web service endpoint URLs and other information about the target organization.

iFrames

One of easiest ways to extend Microsoft Dynamics CRM is to use iFrames (inline frames). When you use iFrames, the Internet or LAN connection is very important because it must maintain a connection to the underlying application and data.

You can use the forms editor in the Microsoft Dynamics CRM client to embed an iFrame in a Microsoft Dynamics CRM form. iFrames can be used for a variety of customizations, such as:

 Incorporating a page from a SharePoint site

 Adding HTML code to the page; for example, to define a button

 Showing a commercial web site; for example, www.msn.com

 Embedding a custom application

xRM

Microsoft Dynamics CRM is an application platform that can be used to develop business applications.

To develop an application for the platform, you build an xRM application (where x stands for anything and RM means relationship management). To build an xRM application, you can customize the existing customer relationship management applications that are included in Microsoft Dynamics CRM, or you can design completely new line-of-business (LOB) applications that are not based on the sales, service, or marketing capabilities included in Microsoft Dynamics CRM. With either approach, your application will use Microsoft Dynamics CRM as a platform, and will take advantage of the capabilities of the platform to deliver business value to your user.

Retailers can use extensible data models and application frameworks to provide a wide variety of functionality. An xRM solution can be a custom application within CRM that exposes new functionality or an LOB application solution on top of CRM. It might be a Silverlight application or a .NET application.

xRM is essentially an application development framework to rapidly develop relational business applications. It is designed to accelerate the development of LOB applications through the use of flexible, dynamic application services. xRM uses familiar Microsoft technologies as building blocks, including Microsoft Office, Microsoft Outlook®, SQL Server, and the .NET Framework.

In addition, you can use the Advanced Developer Extensions included in the Microsoft Dynamics CRM SDK. This set of tools simplifies the development of Internet-enabled applications that interact with Microsoft Dynamics CRM.

The following sections describe the xRM services that you can use to develop Microsoft Dynamics CRM–based LOB applications.

xRM Application Services

xRM provides the following ten application development services to allow developers to rapidly build their business logic, create user experiences, access data, and help secure access (see the diagram that follows):

 Data and metadata services

 User experience services

 Access and security services

 Analytical services

 Extensibility services

 Integration services

 Architecture services

 Management services

 Point and click customization services

 Process automation and orchestration services

These services are described in detail in the following sections.

Data and Metadata Services

A major feature and benefit of xRM is that each application is completely defined in metadata and not in code. This provides great deal of flexibility and extensibility to application developers and business users. Non-technical users can also add new fields that extend the behavior of XRM applications.

Keeping application definitions in metadata simplifies the application upgrade process and allows changes to be published and propagated with no down time. Newer applications built on the platform inherit all these capabilities, thus avoiding rework. The schema and its customizations can be exported and imported, allowing changes to be managed and migrated easily. The tools for managing the schema are all web-based and do not require any special installations. Knowledge of SQL is not required to take advantage of these features because the UI allows the creation or modification of the data fields and schema, automatically enforcing referential integrity rules and data relationships.

The following illustration shows the components of xRM data modeling.

User Experience Services

Developers can use xRM user experience components to create consistent user experiences across multiple LOB applications. This approach reduces training time and increases user adoption. The xRM user experience components allow deep Microsoft Office integration, can be synchronized with Microsoft Outlook, have accessibility features, and are available on standard clients and devices. Each xRM application includes standard prebuilt user functionality. This functionality includes features such as mail merge, presence visibility, a knowledge base, task and activity management, user queues, scheduling management, advanced find and query, smart search, and so on.

The following illustration shows the user experience components provided by xRM.

Access and Security Services

xRM allows for a granular security model that uses role-based access and controls. User administration is simplified by the use of the Microsoft Active Directory® directory service. Security access can be specified for different role profiles. Users can be assigned to these profiles, resulting in a diverse security model with correct access permissions. An additional benefit is that these roles have to be created just once and can then be exported for use in other environments, such as test, staging, and production.

The following illustration shows the access and security components provided by xRM.

Analytical Services

xRM provides analytical services that ensure data and insight consistency across all LOB applications.

The analytical services use proven Microsoft technologies, such as SQL Server, SQL Reporting Services, the SQL Analysis Service, and a central monitoring server that provides centralized data access, storage, and caching services. The monitoring server also supports view rendering and enables better scaling by spreading the database load. Additionally, a dashboard designer makes it possible to create complex dashboards and scorecards. These dashboards and scorecards can be viewed as web pages or via Microsoft Outlook, Microsoft Excel®, Microsoft PowerPoint®, and Microsoft SharePoint.

A report creation wizard is available so that business users can easily create reports and get visual insight into the data. In conjunction with the workflow capabilities present in the Microsoft Dynamics

xRM system, users can take action in response to the analytics. You can use SQL Reporting Services to schedule reports, make them viewable offline, and export them in numerous formats. The types of reports that can be created include OLAP charts, OLAP grids, pivot charts, pivot tables, Excel spreadsheets, trend analysis, web pages, and so on.

Extensibility Services

xRM extensibility services enables IT departments to support many different business requests and rapidly create extensions to fit the unique needs of every application. Extension points are available throughout the architecture so that developers can easily extend the system.

The following illustration shows the extensibility components provided by xRM.

Integration Services

Microsoft xRM provides a wide array of integration capabilities so that developers can rapidly compose applications. These can be categorized into the following four areas:

UI integration – UI integration lets you create composite applications and enterprise mashups.

You can build an integrated UI by simply using the forms editor and adding iFrames to forms that load external application screens. You can also have external applications load xRM forms by creating URL addressable forms. UI integration is low cost and requires less maintenance because the different applications involved are very loosely coupled. This allows for rapid innovation and implementation that would take much longer with traditional applications.

Data Integration – xRM supports building applications by using a more traditional approach in which data is integrated via APIs. xRM provides fully operational data retrieval APIs for

common tasks such as create, read, update, or delete (CRUD) operations. Using these APIs gives retailers a higher degree of control at the right level of granularity that their business requires, and makes it possible to have a higher level of security over the data coming into or going out of the system. xRM has a Metadata API that provides entity, attribute, and

relationship definitions for each organization, including any customizations. You can use this API to build a client-side cache for attributes such as the possible state names or pick-list values. The Metadata API also allows you to customize CRM and LOB applications by adding functionality.

Business Logic Integration – xRM lets you use existing logic from other business applications.

xRM provides access to all the business entity data—including data for custom entities and properties—by dynamically generating web services. In addition, xRM supports the use of plug-ins to extend functionality. This lets you integrate custom business logic, such as custom

data processing rules with specific conditions under which the custom business logic is to execute.

Process Integration – xRM uses a powerful workflow engine to allow processes to flow across applications. It also includes prebuilt connections for integration platforms, such as Microsoft BizTalk®.

Architecture Services

xRM enables developers to build applications that support a broad set of global business application needs. Multi-tenancy is built-into the xRM architecture, and lets developers create applications that support multiple organizations and users on the same application instance. Applications developed on xRM are multi-language because xRM supports more than forty languages, including right to left languages such as Arabic. xRM supports multiple currencies and supports base currency roll-ups.

Management Services

xRM provides tools that reduce administrative costs and tools that streamline and simplify operations.

In addition, applications are fully portable, which streamlines the product lifecycle from development, testing, staging, to production.

The following illustration shows the management components included in xRM.

Point and Click Customization Services

xRM comes with a powerful tool to allow rapid development of applications with minimal code. These point and click tools can be used by both technical and non-technical users. They support fast

deployments and an iterative lifecycle, resulting in less time and resources required for development.

Some of the components accessible through point and click customization are modifications to

relational data schema because all entities are abstracted. The point and click tools help users to create forms and define navigation rules easily. Security can be set based on user roles.

Custom business rules can be coded into the forms and their interactions. Rich analytics and reporting capability can also be configured, allowing users to easily provide a complete application. All the changes and customizations created are dynamically made available to the rest of the system, including the workflows, analytics, wizards, search, and so on.

The following illustration shows the point and click customization components.

Process Automation and Orchestration Services

xRM uses the Windows Workflow Foundation (WF) and enables the automation and orchestration of processes that are required by LOB applications. As business processes are automated and

orchestrated, there is a corresponding cost reduction that results from time and resource savings and enhanced user productivity. Workflows can be configured to fit a retailer's business processes. This way, the best practices that the retailer developed over time can be captured and included in the automated operation. The system facilitates easy creation of workflows through the use of wizards, and also allows for personalization.

For more information on xRM, see the following whitepapers:

 "The xRM Advantage for Solution Builders"

(http://crm.dynamics.com/docs/MS_Dynamics_CRM_xRM_for_Solution_Builders.pdf)

 "Maximize the Value of your Custom Business Applications with Microsoft Dynamics CRM"

(http://crm.dynamics.com/docs/MS_Dynamics_CRM_Maximize_value_with_xRM.pdf)

 "Relational Productivity Applications - Leveraging Microsoft Dynamics CRM and SharePoint for Enhanced Business Impact"

(http://crm.dynamics.com/docs/MS_Dynamics_CRM_SharePoint_and_xRM.pdf)

Related documents