Цитата:
Сообщение от
Артем Enot Грунин
Какая версия системы? Если 4.0 то можно использовать что-то вроде:
Код:
public void Execute(IPluginExecutionContext context)
{
DynamicEntity entity = null;
// Check if the input parameters property bag contains a target
// of the create operation and that target is of type DynamicEntity.
if (context.InputParameters.Properties.Contains("Target") &&
context.InputParameters.Properties["Target"] is DynamicEntity)
{
// Obtain the target business entity from the input parmameters.
entity = (DynamicEntity)context.InputParameters.Properties["Target"];
***
}
}
Получив ваш объект можете спрашивать у него нужные свойства и делать проверки.
Спасибо! Если не трудно, пожалуйста уточните, вот мой код:
public void Execute(IPluginExecutionContext context)
{
DynamicEntity entity = null;
if (context.InputParameters.Properties.Contains("Target") &&
context.InputParameters.Properties["Target"] is DynamicEntity)
{
entity = (DynamicEntity)context.InputParameters.Properties["Target"];
if (entity.Name != "new_certificat") { return; }
}
else
{
return;
}
{
// на форме "new_certificat" есть picklist "new_cursul" со значениями : (Inter=1; Rinter=2)
}