08.08.2011, 23:11 | #1 |
Участник
|
Microsoft Dynamics CRM Team Blog: Web Resources Generated During Upgrades: Don't Ship Them!
Источник: http://blogs.msdn.com/b/crm/archive/...ship-them.aspx
============== Since Microsoft Dynamics CRM 2011 shipped, it has been common practice for ISVs to upgrade their development organizations from CRM 4.0 to 2011 so that they can ship their customizations via solutions. After upgrade, most of you may have already noticed that some newly upgraded orgs contain web resources in the default solution that were generated by the upgrade process (such as Opportunity_main_library.js or contract_ribbon.js). This short write-up can be summarized in a few words: don't ship these auto-generated web resources in your solutions. I'm going to talk about the problems this may cause, the consequences, and a recommendation in managing these web resources. What happens during upgrade? Web Resources is a new feature introduced in Microsoft Dynamics CRM 2011 and one convenience it provides (among many) is it decouples images and JavaScript code from the components that require them. For example, before CRM 2011, client side scripts used to live in FormXml data. This can be painful to maintain. If the JavaScript code is used in different forms, updating it will require updating all forms that have it. With the web resources feature in place, once the web resource is updated, the change will be reflected in all the forms and other components referencing it. During server upgrade, the system goes through the customizations and does the following: Action Generated Web Resource Name Pattern Example Wraps the entity icons into new web resources and updates the entity metadata to point to these icons Icon[Entity Name][Icon Size] IconNew_FooLarge Pulls the JavaScript code off the customized entity forms and into new web resources and updates the FormXml to reference the JavaScript library. This is done per entity. [Entity Name]_main_library.js Account_main_library.js Pulls the JavaScript code off the customized ISVConfig and into new web resources and updates the ribbon customizations to reference the JavaScript library. This is done for the main application ribbon and all other entity ribbons. [Entity Name]_ribbon.js quote_ribbon.js If they all work fine, why not ship them? The main reason why it is strongly recommend NOT to ship these web resources is that their generated names, particularly the JavaScript libraries, are not unique and could cause a name collision! Here are two scenarios that illustrate the consequences: Scenario 1: Multiple managed solutions installed in a fresh CRM 2011 organization - 2 managed solutions containing web resources having the same name cannot coexist in a single organization 1. ISV1 upgrades his CRM 4 server to CRM 2011. He has client side code running in the form events of Account entity, hence Account_main_library.js was generated post upgrade.Scenario 2: Converting customer's own code to managed - it should not be assumed that these web resources do not exist in the customer's org. Their own customizations will be deleted and replaced with yours. 1. ISV3 upgrades his CRM 4 server to CRM 2011. He has client side code running in the form events of Account entity, hence Account_main_library.js was generated post upgrade.What should we do to prevent this? Simply move all contents of auto-generated web resources into new ones with unique and more descriptive names. Don't forget to test before shipping to make sure that all references to the new web resources are updated. Cheers, Greg Alicbusan Источник: http://blogs.msdn.com/b/crm/archive/...ship-them.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|