User workflow not displayed when registering a plugin

Can anyone suggest what I'm doing wrong here?

I created a custom workflow using this example Create a custom workflow . But this does not appear as a plugin / activity type in the plugin registration tool. See image below:

enter image description here

My example code for activity is below:

UPDATED CODE

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Activities; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Workflow; namespace TestCustomWorkflowActivity { public class SampleCustomActivity : CodeActivity { protected override void Execute(CodeActivityContext executionContext) { //Create the tracing service ITracingService tracingService = executionContext.GetExtension<ITracingService>(); //Create the context IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>(); IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>(); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); } } } 

Platform
Dynamics of CRM 2013 by premises v 6.1.2.112 (installed SP1 UR2)
Dynamics CRM 2015 Online

.NET Framework Version
4.0

+7
c # workflow-foundation workflow-foundation-4 dynamics-crm dynamics-crm-online
source share
2 answers

Is the case when your holding class should be publicly available?

 class TestWfActivity 

Must be

 public class TestWfActivity 

Or that the Activity class should be located directly from your namespace, and not the insdie of the TestWFActivity class.

Try either -

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Activities; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Workflow; namespace TestCustomWorkflowActivity { public class TestWfActivity { public class SampleCustomActivity : CodeActivity { protected override void Execute(CodeActivityContext executionContext) { //Create the tracing service ITracingService tracingService = executionContext.GetExtension<ITracingService>(); //Create the context IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>(); IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>(); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); } } } } 

or

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Activities; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Workflow; namespace TestCustomWorkflowActivity { public class SampleCustomActivity : CodeActivity { protected override void Execute(CodeActivityContext executionContext) { //Create the tracing service ITracingService tracingService = executionContext.GetExtension<ITracingService>(); //Create the context IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>(); IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>(); IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId); } } } 
+6
source share

I had the same problem while working with CRM 2013 (both internally and online). I never managed to solve this problem, but she easily worked on it using the registration tool from 2015. For unknown reasons, one works better.

+6
source share

All Articles