Показать сообщение отдельно
Старый 01.11.2016, 12:12   #4  
Ion is offline
Ion
Участник
 
332 / 16 (1) ++
Регистрация: 19.12.2012
Извините за тупой вопрос: юзаю Plugin Registration из SDK 2013, написал кастомную активити, залил сборку через тулу, но не вижу ValidateChangeProcessStage в списке зарегистрированных, что я не так делаю?))

X++:
    public class ValidateChangeProcessStage : CodeActivity
    {
        [RequiredArgument]
        [Input("Contact")]
        public InArgument<Entity> Contact{ get; set; }

        protected override void Execute(CodeActivityContext executionContext)
        {
            IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
            IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
            IOrganizationService service = serviceFactory.CreateOrganizationService(null);

            Entity contact= Contact.Get<Entity>(executionContext);
            if(contact!= null)
            {
                if (!contact.Contains("uds_statuscode"))
                {
                    new InvalidPluginExecutionException("You can not change process flow stage manually");
                };
            }
        }
    }