Posts Tagged CRM 4.0
Im taking a step back in time today, back to 2009 and a problem that has arisen again for me today. Im trying to register a “Add” plugin event against a custom many-to-many relationship. Out of the box this isnt supported in CRM 4.0 (apparently it was omitted before release due to more testing needed).
There is a work around that has been out there for while from Aaron Elder I wanted to share.
Step 1) Backup up your CRM Database
Step 2) Run the following SQL script against your MSCRM database
-- ============================================================================ -- Enable Associate and Disassociate Plug-in Events Script v1.0 -- ---------------------------------------------------------------------------- -- (c) 2009 Aaron Elder -- ============================================================================ -- DISCLAIMER: -- This script is provided "AS IS" with no warranties, and confers no rights. -- ============================================================================ -- While this is obviously "unsupported", I think the fact that these events -- are not available is a bug and hopefully it will be fixed in a rollup. -- ============================================================================ USE AscentiumCrmDev_MSCRM GO -- Find the deployments SDK Filter ID for the -- Associate and Disassociate Entity SDK Messages DECLARE @DisassociateEntitiesFilterId uniqueidentifier DECLARE @AssociateEntitiesFilterId uniqueidentifier SET @DisassociateEntitiesFilterId = (SELECT SdkMessageId FROM SdkMessageBase WHERE [Name] = 'DisassociateEntities') SET @AssociateEntitiesFilterId = (SELECT SdkMessageId FROM SdkMessageBase WHERE [Name] = 'AssociateEntities') -- Enable the Associate and Disassociate Filters to be valid for custom processing -- Custom Processing means "you register plug-ins against it" -- Note: We only do this for the "generic" (OTC == 0) case, just to be safer UPDATE SdkMessageFilterBase SET IsCustomProcessingStepAllowed = 1 WHERE SdkMessageId = @DisassociateEntitiesFilterId AND PrimaryObjectTypeCode = 0 UPDATE SdkMessageFilterBase SET IsCustomProcessingStepAllowed = 1 WHERE SdkMessageId = @AssociateEntitiesFilterId AND PrimaryObjectTypeCode = 0
Step 4) Recycle the CRMAppPool for CRM and open up your Plugin registration tool.
Step 5) Register a Step with the message “AssociateEntity” or “DisassociateEntity”. As expected the many-to-many bridge tables are not exposed in the entity list, so you just leave this blank.
Step 6) Now the obvious issue here is ALL many-to-many relationships in your CRM system will trigger off this plug-in as it cannot be entity specific. I did some digging and the easiest way to limit this to a single relationship is to check the Target input parameters. Typically you would be looking for entity name in the context – this does not exist for many-to-many. The next best thing is the relationship name which can be found here:
string relationshipName = context.InputParameters.Properties[“RelationshipName”];
Do a comparison to the name of your many-to-many relationship and proceed with your custom code if a match is found.
From what I can see, CRM 2011 also supports the AssociateEntity and DisassociateEntity messages, so while this might be unsupported, atleast Microsoft have continuity in CRM 2011. I stress the code above is unsupported, use at your own risk.
A major CRM 4.0 rollup was released last week in the form of Rollup 16.
If you havent reviewed the fixes yet, visit the download site here.
Error message when you try to import Microsoft Dynamics CRM Online customizations into a Microsoft Dynamics CRM 4.0 organization
I encountered an interesting scenario yesterday with a client where I needed to import their CRM 4.0 Online customizations into CRM 4.0 On-premise (Which was in a Virtual Machine). Perhaps this scenario isn’t overly common, but going forward if you have CRM 4.0 Online customers who want to go to say CRM 2011 On-Premise then there a few things you need to know.
I discovered there are several customizations that are only applicable to CRM 4.0 Online that will prevent the import being successful. After some further digging I found there is a tool available called the Migration Processer Tool which will allow you to “transform” your XML and prepare it for On-Premise.
When the MigrationProcessor Tool runs, it runs various processors configured in the Processor config file. The current version runs the following processors:
- Visualizations Processor
- Internet Marketing Processor
- Helpvisor Processor
- Homepage Processor
All processors, except the last processor have the IgnoreValidationErrors set to true as the work is not really complete and the validations do not succeed until the last processor succeeds in processing if all processors deal with different aspects of cleanup in the same element. In this case when the Internet Marketing processor completes its job it still has validation failures againt site map xsd as there is still cleanup work needed to be completed by the Help Visor processor and so you get the validation errors. Once the last processor set in the config file runs we do not expect any more validation errors as the set processors have all completed the job of cleaning up.
To access the Migration Processor tool, follow these steps:
- Download Update Rollup 7 for Microsoft Dynamics CRM 4.0. To do this, visit the following Microsoft Web site: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a4893988-7804-4e23-ab58-740441cc696e (http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a4893988-7804-4e23-ab58-740441cc696e)
- Save the downloaded file to a folder.
- Click Start, click Run, type cmd, and then click OK.
- Change directories to the folder that contains the file for Update Rollup 7 for Microsoft Dynamics CRM 4.0, type CRMv4.0-KB971782-i386-Server-ENU.exe /x, and then press the ENTER key.
- I didn’t actually install Rollup 7, I just followed the steps in order to access and copy the tool. My CRM is patched with Rollup 12.
- Click Save when you are prompted to save the extracted files.
- Change directories to the Tools/Customizationmigrationprocessor directory. The directory is located where the extracted files were saved in step 5.
- At a command prompt, run the Migrationprocessortool.exe file that is located in the Customizationmigrationprocessor folder. To do this, run the following command:
- The Customizationfile placeholder represents the location of the Microsoft CRM Online customization file that you want to process.
- When you run the Migrationprocessortool.exe file, the tool processes the customizations. Then, the tool saves a new file that is named “ProcessedCustomization.xml” in the Customizationmigrationprocessor folder.
- The ProcessedCustomization.xml file contains a new set of customizations.
After you covert the CRM Online customization file into a CRM 4.0 customization file, use the ProcessedCustomization.xml file to import Microsoft Dynamics CRM Online customizations into a Microsoft Dynamics CRM 4.0 organization.
Done! I did notice that some of the Navigation items were not showing as they were in CRM Online, but after customizing My Workplace I was able to get everything back in place.
Please see the Microsoft Support KB http://support.microsoft.com/kb/976978 for more information.
Channel 9 has posted a great video talking about the evolution of the user experience of Microsoft CRM from the past releases through to the new version CRM 2011 . Where CRM 4.0 was heavily focused on relationship management and ‘working the way you do’, CRM 2011 has a strong emphasis on personalization of the user interface to create familiarity. The new user experience is achieved using role and form based security aswell as a UI that is tailored to the context of the form. To view the video and learn more about the advanced UI features in CRM 2011 please click here.