CRM Extensibilities -01- Solution

   首先,什么是CRM解决方案?

Solutions are howcustomizers and developers author, package, and maintain units of software thatextend Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online.Customizers and developers distribute solutions so that organizations can useMicrosoft Dynamics CRM to install and uninstall the business functionalitydefined by the solution.

CRM2011提供的解决方案功能提供给开发者认证,打包,集中维护对CRM的扩展的方法,同时,作为解决方案的使用者-客户-一端,也可以使用这一功能方便的安装ISV提供的扩展。

 

  可以提供给我们的扩展CRM的途径有什么?

Use solutions to extend the capability of Microsoft Dynamics CRM. For software that operates outsidethe application, use traditional methods to package and install yourapplication.

If your applicationconsists only of Microsoft Dynamics CRM solution components, it can beimported. You will not have to create an installer program.

An application with external components

However, if your extensionsinclude a combination of Microsoft Dynamics CRM solution components andexternal components, which are not Microsoft Dynamics CRM solutioncomponents, you will need an installer.

For example, you may createa .NET Framework application that manages data stored in custom MicrosoftDynamics CRM entities using the Web Service APIs. People who install yourapplication may install a Microsoft Dynamics CRM solution to create thecustom entities and then install your application separately by using aninstaller. Or, you may want to include the installation of the MicrosoftDynamics CRM solution into the installer you create for your application.

由上图可见,我们不止可以通过CRM中提供的解决方案功能去扩展CRM,还可以编写各种应用程序与之配合,协同工作。但有一点,作为对CRM本身的扩张,我们可以通过生成解决方案进行发布和维护,但CRM以外的程序,提供相应的安装文件还是必须的。

 

  对CRM本身的扩展包含那些方面?

Solution components arecreated by using the customization tools or APIs included in MicrosoftDynamics CRM and are fully hosted in the application. The followingdiagram shows the types of solution components.

Solution Components

可供扩展的组件多种多样,CRM提供给我们两种途径进行扩展:

⑴UI - Administration Tool

⑵SDK

DynamicsCRM采用的是Metadata-driven Architecture,其中大量的使用了webservice和xml,使用第一种UI的方法其实本质上也是在调用webservice,这点跟直接使用SDK没有什么两样,只不过由于有了UI,所以大大的提高了可操作性,把各种操作直观化,方便了普通用户直接对系统进行扩展的需求。这样就可以由业务人员自己完成包括业务实体的定制。

以上两种操作中所遇到的问题,都会由微软提供技术支持。

 

 

  Unmanaged and Managed Solutions

 Solution layering

There are two types of Microsoft Dynamics CRM solutions: Unmanaged and Managed. A managed solution is a completed solution that is intended to be distributed and installed. An unmanaged solution is one that is still under development or is not intended to be distributed. When the unmanaged solution is complete and you want to distribute it, export the unmanaged solution and select the option to package it as a managed solution.

由上图我们也可以看到,Managed Solution是独立的个体,它们之间虽然可能会存在依赖关系,但是互不干涉。而Unmanaged Solution则处于混沌的状态,所有的修改全部融合在一起,每个solution的修改都有可能覆盖其他solution。所以在真正发布之前,把Unmanaged Solution进行组织,生成Managed Solution是有必要的,同时由于使用了Managed Solution,客户可以方便的进行安装和卸载,提高了可维护性。 

下面,对上图中出现的名词进行逐条解释:

System Solution
The system solution represents the solution components defined within Microsoft Dynamics CRM. Without any managed solutions or customizations, the system solution defines the default application behavior.

Many of the components in the system solution are customizable and can be used within managed solutions or unmanaged customizations.

Managed Solutions
Managed solutions are installed on top of the system solution and can modify any customizable solution components or add more solution components.

Managed solutions can also be layered on top of other managed solutions. As long as a managed solution enables customization of solution components within it, other managed solutions may be installed on top of it and modify any customizable solution components that it provides.

Unmanaged Customizations
All customizable solution components provided by the system solution or any managed solutions can be customized in the unmanaged customizations.

Unmanaged Solutions
Unmanaged solutions are groups of unmanaged customizations. Any unmanaged customized solution component can be associated with any number of unmanaged solutions.

You create a managed solution by exporting an unmanaged solution and selecting to package it as a managed solution.

Application Behavior
The ultimate behavior of an instance of Microsoft Dynamics CRM for a specific organization is the culmination of the system solution, any managed solutions and any unmanaged customizations.

Unmanaged Solutions

When a solution is unmanaged, you can perform the following actions:

  • Add components.

  • Remove components.

  • Delete components that allow for deletion.

  • Export and import the unmanaged solution.

  • Export the solution as a managed solution.

An unmanaged solution is roughly equivalent to customizations performed by using Microsoft Dynamics CRM 4.0. However, in Microsoft Dynamics CRM 4.0 you couldn’t create a group of items you wanted to export separately. In Microsoft Dynamics CRM 2011, you can include a solution component in as many groups as you want.

Importing Unmanaged Solutions

When you import an unmanaged solution, you can edit its components in the new organization.

Unmanaged Customizations

Each Microsoft Dynamics CRM organization contains customizable solution components. Together, all of these solution components are called the default solution. This is the solution you edit when you select Customize the System in the application. You can export this solution and the customizations within it in just like an unmanaged solution. However, you cannot export the default solution as a managed solution.

Create an Unmanaged Solution

If you do not intend to generate a managed solution, you do not have to create an unmanaged solution. You can customize the system directly. Organizations that just want to be able to edit, backup, and transport their customizations do not have to use the more advanced capabilities of the Microsoft Dynamics CRM solutions framework.

When you create an unmanaged solution, you create a way to group a subset of the available customizable solution components. The solution components in an unmanaged solution are references to customizable solution components in the organization.

After you create an unmanaged solution you can add solution components to it. By using this smaller set of components you can decide to only include those solution components that are relevant to a particular functionality. This allows for a smaller size package when you export your solution and makes a more manageable set of components.

Any components you add to your unmanaged solution are included in the customizable solution components for the system. Unmanaged solution components can be added to multiple unmanaged solutions.

Delete an Unmanaged Solution

If you delete an unmanaged solution, you are just deleting the group used to contain references to solution components. The solution components in an unmanaged solution remain in the system but they are no longer associated with the unmanaged solution you delete.

Unmanaged Solution中保存的只是一些引用,通俗的讲,只是对一下自定义的归拢分类,删除了这个Unmanaged Solution也就等于删除了一种分类方式,这并不影响分类中内容的继续存在。归结到上图来说,最本质的修改是通过Unmanaged Customization来进行的。

Managed Solutions

If you intend to distribute your solution as a managed solution, export your unmanaged solution and select the Managed option in the Package Type dialog box.

After you install a managed solution, the following applies:

  • You cannot add or remove solution components in a managed solution.

  • You cannot export a managed solution.

  • Deleting a managed solution uninstalls all the solution components within it.

一旦将solution以managed形式进行导出,那么,安装这个解决方案的CRM中,对这个解决方案的修改就将封闭。除非用高版本的solution对之前的内容进行升级。

For more information about the specific tasks you can perform with managed solutions.

After you install a managed solution you may be able to customize the solution components if the creator of the managed solution has configured the managed solution to enable it. You must access the customizable solution components using Customize the System instead of through the managed solution itself.

Whether a solution component is customizable and what specific customization actions are enabled is controlled by using Managed Properties.

Solution Publisher for managed solutions

When you intend to distribute managed solutions, the solution publisher record associated with your managed solution is created in each organization that installs your solution. Use the solution publisher to provide information about how people who install your solution can contact you.

The solution publisher for a managed solution is also important if you want to release an update to your managed solution. If you use the same solution publisher you can create a new managed solution with the ability to update a managed solution you previously released. For more information, see Maintain Managed Solutions.

Managed Properties

Using managed properties, the creator of a managed solution can control whether a solution component is customizable and which specific parts of it can be customized.

The exact managed properties available depend on the type of solution component. The following screenshot shows the managed properties for a custom entity.

Managed properties for an entity

By default, the managed property settings assume that any kind of solution component is fully customizable. Solution developers are encouraged to enable solution components in their solutions to be customizable. However, there are situations where the definition of a solution component must be ”locked down” to avoid potential breaking changes or to make future maintenance of the solution component easier.

Conflict Resolution

When two or more solutions define solution components differently, Microsoft Dynamics CRM resolves the conflict using two strategies, Merge and Top Wins. The following diagram illustrates the differences.

Two Solution conflict resolution strategies

Merge
User interface components (ribbons, forms, and site map) are merged. This means that the solution components are re-calculated from the lowest level to the highest so that the organization’s unmanaged customizations are the last to be applied.

Top Wins
For all other solution components any conflict is calculated in favor of the customization that is applied last. For managed solutions this usually means that the last solution installed is applied. However, there is a special case when an update to a managed solution is installed.

Conflict resolution on the update of a managed solution

Because unmanaged customizations are considered ”above” any managed solution in terms of conflict resolution, organizations installing an update to a managed solution may not see their changes applied because of unmanaged modifications. An option exists to make sure that changes applied by an update to a managed solution are available.

When you release an update to a managed solution, the organization installing the update can select:

  • To preserve any customizations they have applied on top of your managed solution.

  • To overwrite any customizations they have applied on top of your managed solution.

Organizations installing an update to a managed solution should work with the managed solution creator to evaluate which option is best.

Dependency Tracking

The solutions framework automatically tracks dependencies for solution components. Every operation on a solution component automatically calculates any dependencies to other components in the system. The dependency information is used to maintain the integrity of the system and prevent operations that would lead to an inconsistent state.

As a result of dependency tracking the following behaviors are enforced:

  • Deleting a component is prevented if another component in the system depends on it.

  • Exporting a solution warns the user if there are any missing components that could potentially cause failure when importing that solution in another system. 

    Warnings during export can be ignored if the solution developer intends that the solution is only to be installed in an organization where dependent components are expected to exist. For example, when you are creating a solution that is designed to be installed over a pre-installed “base” solution.

  • Importing solution fails if all required components are not included in the solution and also do not exist in the target system.

    • Additionally, when importing a managed solution all required components must match the package type of the solution. A component in a managed solution can only depend on another managed component.

For more information, see Dependency Tracking for Solution Components.

Support for Multiple Languages

Microsoft Dynamics CRM 2011 natively supports multiple languages. Whenever a language pack (sometimes referred to as a ”MUI pack”) is installed, user interface elements of Microsoft Dynamics CRM can be displayed in a different language.

There are a number of different tactics you should apply based on the type of solution components included in your solution. For more information, see Create Solutions That Support Multiple Languages.



相关学习资源:

① http://msdn.microsoft.com/en-us/library/gg334576.aspx

② http://www.slideshare.net/NereaMSDCRM/microsoft-crm-2011-walkingthrough-part-2


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值