web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Shall I write plugin methods as static or instance?

(0) ShareShare
ReportReport
Posted on by 155

I´m creating a plugin (sync and post-operation) that will be run perhaps 100 days per day. It contains approx 15 methods.

I´m struggling to understand if it best if my methods are Static or instance methods in this case?

Thanks in advance!

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi Kranis,

    It's prefered to writhe the execute methods as a stateless operation.

    Take a look here: docs.microsoft.com/.../develop-iplugin-implementations-stateless

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    I would say you should use instance methods but in the case of plugins, it should not matter. Anyway, it's up to you to decide. You can check the following - docs.microsoft.com/.../static-classes-and-static-class-members

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 81 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans