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

Announcements

News and Announcements icon
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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 142 Super User 2026 Season 1

#2
Nagaraju_Matta Profile Picture

Nagaraju_Matta 128

#3
ManoVerse Profile Picture

ManoVerse 127 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans