Both workflows and plug-ins can attach to exactly the same events. Well, plug-ins have available a couple of more events but essentially both work on top of the same event model.Remember also that workflows always run asynchronous and hence, the Asynchronous Processing Service must be running on the server in order to run. Workflows [...]
Posts Tagged ‘Plug-Ins’
Plug-ins vs. Workflows in Microsoft Dynamics CRM
Posted: October 29, 2010 in Microsoft Dynamics CRMTags: Plug-In, Plug-Ins, Workflow
AutoNumber Plug-In for Custom Entity In CRM 4.0
Posted: July 28, 2010 in Microsoft .NET, Microsoft Dynamics CRMTags: AutoNumber, CRM, Plug-Ins
using System; using System.Collections.Generic; using System.Text; using Microsoft.Crm.Sdk; using Microsoft.Crm.SdkTypeProxy; using Microsoft.Crm.Sdk.Query; using System.Web.Services.Protocols; namespace CRM.Customization.AutoNumber { public class AutoNumberPlugIns:IPlugin { DynamicEntity entity = null; int startNumber; string prefix = string.Empty; string seperator = string.Empty; int nextMaxNumber; string uniqueId = string.Empty; #region IPlugin Members public void Execute(IPluginExecutionContext context) { if (context.InputParameters.Properties.Contains(“Target”) && context.InputParameters.Properties["Target"] is DynamicEntity) [...]
PlugIn Impersonation In Microsoft Dynamics CRM 4.0(i.e Executing plugin code on behalf of another user.)
Posted: January 20, 2009 in Microsoft Dynamics CRMTags: Impersonation, Plug-Ins
If we want to execute some code in behalf of another user not the calling user then we have to handle this in PlugIn code. Whatever the user selected during PlugIns registration, it doesn’t matter, code will alwaysexecute on behalf of user mentioned in code.Example Create a Record in CRM on behalf of another user. [...]
Using FilteredView to retrieve data in Plug-In or Callout
Posted: December 12, 2008 in Microsoft .NET, Microsoft Dynamics CRMTags: FiltededView, Plug-In, Plug-Ins, Retrieve Data
To retrieve data from CRM Database( FilteredView)….. SqlConnection connection = new SqlConnection(“DataSource=<dsName>;Initial Catalog=<databaseName> ;Integrated Security=SSPI;”); string sqlQuery = @” select max(new_uniqueid) from FilteredView” ; SqlCommand cmd = new SqlCommand(sqlQuery, connection); connection.Open(); /// Write Logic here connection.Close(); But this code wasn’t returning any results .It was because callout/plugin run under the context of [...]

