Posts

Showing posts with the label Dynamic CRM 2011

Real-Time Workflow vs Plugin: Execution Order

Image
Like plugins, real-time workflows are executed before (pre-operation) or after (post-operation) the core operation. Both are executed inside the same database transaction. Here are outlined some actions I have executed in order to evaluate their execution order: Customization of a custom entity named Entity A which contains two text fields named ‘Plugin Text’ and ‘Workflow Text’; Registration of two synchronous plugin steps for Pre Update and Post Update, which are triggered when the Entity A name field is updated: Pre Update Event: sets ‘Plugin Text’ with PLUGIN | PRE UPDATE; Post Update Event: sets ‘Plugin Text’ with PLUGIN | POST UPDATE; Creation of two real-time workflows; one runs before the update and the other runs after the update. Both are triggered when the Entity A name field is updated: Before Update: sets ‘Workflow Text’ with Workflow | PRE UPDATE; After Update: sets ‘Workflow Text’ with Workflow | POST UPDATE; Then after created and Entity A record, upd...

Duplicate Record Detection Plugin

Hi , Recently I had a requirement to create Duplicate detection rule using c# (Plugin) in Account Entity, to avoid redundancy. You can try like bellow method 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 using System; using System.Collections.Generic; using System.Linq; using System.Text; //CRM SDK Namespace using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; using Microsoft.Crm.Sdk.Messages;   namespace Sample {      public class Duplicate_Detection : IPlugin      {          public void Execute(IServiceProvider serviceProvider)          {              IPluginExec...