0

动态 CRM 365

在自定义操作中添加一个没有参数的自定义工作流步骤自定义工作流执行成功但有参数显示错误“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; }
4

1 回答 1

0

如果你删除<string>所以你的行显示:

string _emailId = EmailID.Get(context);
于 2017-02-28T11:52:21.560 回答