Hello Community Experts,
Please suggest me how to learn custom workflow from scratch.
I'm new to dynamics 365, please guide me step by step.
Best Regards,
Sumaira Noor
Thanks for the help Lu and Goutam
Hope below reference helps you -
Hi Sumaira,
First, you should already have Visual Studio in your system.
I recommend reading this blog, which is based on the latest D365 environment. It shows you the detailed creation steps.
Basically, you need to follow these steps to create a custom workflow:
Create a Class Library project using .NET Framework 4.6.2 as the target framework.
Install the Microsoft.CrmSdk.Workflow NuGet package.
This package includes the Microsoft.CrmSdk.CoreAssemblies package.
(Optional) If you wish to use early bound entity classes, include them in the project.
Add a public class. The name of the class should correspond with the action to be performed by the activity.
Add the following using directives
using System.Activities;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;
Add properties to the class to represent any input or output parameters and use .NET attributes to provide necessary metadata to expose these properties to the workflow process designer.
Make your class derive from the CodeActivity Class and implement the Execute(CodeActivityContext) Method that contains the operations your activity will perform.
Sign your assembly
Build your assembly.
Register your assembly using the Plug-in Registration tool and set the Name
and WorkflowActivityGroupName
properties to define the text that will be visible in the process designer.
Test your workflow activity by invoking it from within a Workflow, dialog, or action processes
(Recommended) Add your workflow activity to a solution.
You can also find these steps in the official documentation, and there are 3 code examples in the documentation.
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156