|
|
#3 |
|
Участник
|
Цитата:
X++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
namespace Mont.CRM.Plugins
{
public class ActivityPointerNextStep : Plugin, IPlugin
{
public ActivityPointerNextStep()
: base(typeof (ActivityPointerNextStep))
{
this.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(20, "Update",
"activitypointer", InitFields));
}
protected void InitFields(LocalPluginContext ctx)
{
if (!ctx.PluginExecutionContext.InputParameters.ContainsKey("Target"))
{
ctx.Trace("Не обнаружена целевая сущность");
return;
}
var target = ctx.PluginExecutionContext.InputParameters["Target"] as Entity;
if (target == null)
{
ctx.Trace("Не обнаружена целевая сущность");
return;
}
throw new InvalidPluginExecutionException("test!");
}
}
}
Последний раз редактировалось b777; 14.04.2014 в 00:26. |
|
|