Цитата:
Сообщение от
a33ik
Скриншоты не помешают.
В новой сборке всего один аction, а в RT ничего нет
X++:
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;
using System;
using System.Activities;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EmployeeWorkflow.Actions
{
public class ValidateChangeProcessStage : CodeActivity
{
[ReferenceTarget("contact")]
public InArgument<EntityReference> ontact { get; set; }
protected override void Execute(CodeActivityContext executionContext)
{
IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
IOrganizationService service = serviceFactory.CreateOrganizationService(null);
EntityReference contact = ontact.Get<EntityReference>(executionContext);
if (contact != null)
{
new InvalidPluginExecutionException("You can not change process flow stage manually");
}
}
}
}