コード例 #1
0
        protected override void ExecuteWorkflowLogic()
        {
            var incidentCloseRequest = new CloseIncidentRequest()
            {
                Status             = IncidentStatus.Get(Context.ExecutionContext),
                IncidentResolution = new Entity("incidentresolution")
                {
                    ["subject"]     = Subject.Get(Context.ExecutionContext),
                    ["incidentid"]  = Incident.Get(Context.ExecutionContext),
                    ["description"] = Description.Get(Context.ExecutionContext),
                    ["timespent"]   = TimeSpent.Get(Context.ExecutionContext)
                }
            };

            Context.UserService.Execute(incidentCloseRequest);
        }
コード例 #2
0
        protected override void ExecuteWorkflowLogic(CodeActivityContext executionContext, IWorkflowContext context, IOrganizationService service)
        {
            var incidentCloseRequest = new CloseIncidentRequest()
            {
                Status             = IncidentStatus.Get(executionContext),
                IncidentResolution = new Entity("incidentresolution")
                {
                    ["subject"]     = Subject.Get(executionContext),
                    ["incidentid"]  = Incident.Get(executionContext),
                    ["actualend"]   = CloseDate.Get(executionContext),
                    ["description"] = Description.Get(executionContext)
                }
            };

            service.Execute(incidentCloseRequest);
        }