Tuesday, October 19, 2010

CRM / XRM virtual Groups

you can find the useful information about Microsoft CRM 4, MS CRM 2010, XRM on those blogs..



List of CRM blogs..


Some Useful links about MS CRM..


Easy Customizations for MS CRM

Audit Capabilities
1. http://www.xrmshowcase.com/solutions/view?solutionid=c0ef7bcb-0a66-4658-aa95-b6da8ea30011

2. http://www.consultcrm.co.uk/add-ons.html

Javascript Grid Editor for CRM
1. http://www.xrmshowcase.com/solutions/view?solutionid=a0d69487-a91a-4063-8671-93c45e31fe4b

2. http://crmentropy.blogspot.com/p/javascript-grid-editor.html

PowerSearch for MS CRM 4.0 by mscrm-addons
1. http://www.xrmshowcase.com/solutions/view?solutionid=acd78d8b-f98f-4425-bc9d-10945abb7fa1
2. http://www.mscrm-addons.com/Products/AddonsforMSCRM40/ActivityToolsforMSCRM40/tabid/160/Default.aspx

Caching tool for Microsoft CRM

1. http://blogs.msdn.com/b/joris_kalz/archive/2006/08/09/caching-tool.aspx

2. http://blogs.msdn.com/b/joris_kalz/archive/2006/08/09/caching_tool.aspx

Limitations of XRM


Link to run report from workflow


Trigger N:N Association event and Dassiciation event in CRM Plugin

-- ===================================================================================================
-- Enable Associate and Disassociate Plug-in Events
-- execute the following query to CRM database, it will add two entries in SdkMessageFilterBase
-- 'DisassociateEntities' and 'AssociateEntities' from SdkMessageBase which is not listed
-- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

-- 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
The above query will enable the 'DisassociateEntities' and 'AssociateEntities' message in the plug-in registration tool. While registering the plug-in select the entity name as ‘none’

While executing the plug-in you will be getting four parameter as input parameters from the plug in context along with the other properties :

1. Related Entity1 GUID and entity name
2. Related Entity2 GUID and entity name
3. Relation hsip name (nothing but intersect hidden N:N entity name)
4. Optional parameter.

Using these value you can implement you logic.

Sample Code for N:N relationship with a custom entity and System User:

public void Execute(IPluginExecutionContext context)
crmservice = context.CreateCrmService(true);

if (context.MessageName == "AssociateEntities")

if (context.InputParameters.Properties["RelationshipName"].ToString() == "new_new_customentity_systemuser")
string oId = string.Empty;
string SharedUserId = string.Empty;

oId = (context.InputParameters.Properties["Moniker1"] as Moniker).Id.ToString();

SharedUserId = (context.InputParameters.Properties["Moniker2"] as Moniker).Id.ToString();

// write you logic here


catch (System.Web.Services.Protocols.SoapException ex)

catch (Exception ex)

Note : As we have defined 'none' as the entity name while registering the plug-in, so this plug-in will get triggered when ever user will do add existing or remove existing, for any entity. So while writing the logic relationship name is required to identify from where plug-in has been triggered.

References: http://consulting.ascentium.com/blog/crm/Post533.aspx