Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Suggested answer

constructor in custom workflow activities

(0) ShareShare
ReportReport
Posted on by

When writing custom workflow activity, can we code the class constructor and initialize any variables? is there any parameters that CRM platform pass to the contsructor of custom workflow activity(as class inherits from codeactivity)?

I know we can pass parameters using in\out arguments but I had a query about use of constructor in custom workflow activities. Please advise.

  • Suggested answer
    mobeenmohsin Profile Picture
    mobeenmohsin on at
    RE: constructor in custom workflow activities

    Hi,

    Hope you are doing well.

    It is not possible to use constructors in custom workflow activities and constructor is not being called each time, please see the reference document:

    https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/workflow/workflow-extensions#add-your-code-to-the-execute-method

    Please mark this answer if you don't have any further question. Thank you.

    Best Regards,

    Mobeen Mohsin

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,735 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,466 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans