Dynamics CRM 365
在自定义操作中添加CustomWorkflow的步骤 没有参数CustomWorkflow执行成功 但参数显示错误 “System.AggregateException:发生了一个或多个错误。”
protected override void Execute(CodeActivityContext context)
{
ITracingService _tracer = context.GetExtension<ITracingService>();
IWorkflowContext _workflowContext = context.GetExtension<IWorkflowContext>();
IOrganizationServiceFactory _serviceFactory = context.GetExtension<IOrganizationServiceFactory>();
IOrganizationService _service = _serviceFactory.CreateOrganizationService(_workflowContext.UserId);
try
{
string _emailId = EmailID.Get<string>(context);
throw new InvalidPluginExecutionException("An Error Occured" + _emailId);
}
catch (FaultException<OrganizationServiceFault> ex)
{
throw new InvalidPluginExecutionException("An Error Occured in Followup Plugin!", ex);
}
catch (Exception ex) {
_tracer.Trace("Exception", ex.ToString());
throw;
}
}
[Input("EmailID")]
public InArgument<string> EmailID { get; set; }
[Input("SubPoId")]
public InArgument<string> SubPOId { get; set; }
答案 0 :(得分:0)
如果您删除<string>
,那么您的行如下所示:
string _emailId = EmailID.Get(context);