Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Custom Workflows in dynamics 365

(0) ShareShare
ReportReport
Posted on by 1,075

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

  • Sumaira Noor Profile Picture
    Sumaira Noor 1,075 on at
    RE: Custom Workflows in dynamics 365

    Thanks for the help Lu and Goutam

  • Verified answer
    gdas Profile Picture
    gdas 50,087 on at
    RE: Custom Workflows in dynamics 365

    Hope below reference helps you  -

    www.ashishvishwakarma.com/.../

  • Verified answer
    LuHao Profile Picture
    LuHao 40,874 on at
    RE: Custom Workflows in dynamics 365

    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:

    1. Create a Class Library project using .NET Framework 4.6.2 as the target framework.

    2. Install the Microsoft.CrmSdk.Workflow NuGet package.

      This package includes the Microsoft.CrmSdk.CoreAssemblies package.

    3. (Optional) If you wish to use early bound entity classes, include them in the project.

    4. Add a public class. The name of the class should correspond with the action to be performed by the activity.

    5. Add the following using directives

      using System.Activities;
      using Microsoft.Xrm.Sdk;
      using Microsoft.Xrm.Sdk.Workflow;
      
    6. 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.

    7. Make your class derive from the CodeActivity Class and implement the Execute(CodeActivityContext) Method that contains the operations your activity will perform.

    8. Sign your assembly

    9. Build your assembly.

    10. 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.

    11. Test your workflow activity by invoking it from within a Workflow, dialog, or action processes

    12. (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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans