Example:
public class PreTest : IPlugin
{
public void Execute(IPluginExecutionContext context)
{
// Create or retrieve some data that will be needed by the post event handler. You could run a query, create an entity, or perform a calculation.
//In this sample, the data to be passed to the post plug-in is represented by a GUID.
Guid contact = new Guid(“{74882D5C-381A-4863-A5B9-B8604615C2D0}”);
// Pass the data to the post event handler in an execution context shared variable named PrimaryContact.
context.SharedVariables[“PrimaryContact”] = contact.ToString();
}
}
public class PostTest : IPlugin
{
public void Execute(IPluginExecutionContext context)
{
// Obtain the contact from the execution context shared variables.
if (context.SharedVariables.Contains(“PrimaryContact”))
{
Guid contact = new Guid((string)context.SharedVariables[“PrimaryContact”]);
// perform action on contact.
}
}
}
70% of global 2000 companies apply gamification to improve productivity and returns!
Gamifics365 – Spin the magic of games within Microsoft Dynamics 365 CRM to improve user adoption, enhance productivity, and achieve company goals!