Dataverse Custom Workflow Activities: When and How to Extend Classic Processes

Custom workflow activities are .NET extensions historically used by classic workflows and related process execution. For new integration-facing operations, evaluate Custom APIs and modern Power Automate patterns before choosing this older extension point.

Background

Understand custom workflow activities in Dataverse, their input and output arguments, registration and when a Custom API is a better fit.

Step-by-step guide

  1. Confirm that the target environment and process type support the custom workflow activity scenario you need.
  2. Create a .NET Framework assembly targeting the supported Dataverse plug-in framework requirements for the environment.
  3. Define input and output arguments with appropriate workflow argument attributes and types.
  4. Register the assembly and activity using the supported tooling, then make the activity available to the intended process.
  5. Test null inputs, invalid values, security context and execution behaviour in the target workflow.

Example

public sealed class NormalizeCode : CodeActivity
{
    [Input("Source code")]
    public InArgument<string> SourceCode { get; set; }

    [Output("Normalized code")]
    public OutArgument<string> NormalizedCode { get; set; }

    protected override void Execute(CodeActivityContext context)
    {
        var source = SourceCode.Get(context) ?? string.Empty;
        NormalizedCode.Set(context, source.Trim().ToUpperInvariant());
    }
}

Pitfalls and recommendations

  • Do not assume custom workflow activities are the best choice for new cloud integrations.
  • Verify framework and deployment compatibility before building the assembly.
  • Keep activity execution short and avoid long-running external calls.

Validation

Validate registration, argument mapping, workflow execution, null handling and whether a Custom API or cloud flow would be a better supported option.

Conclusion

Keep the design aligned with the platform’s supported model, validate behaviour in a representative environment and document how the team will operate and troubleshoot it.