Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Suggested answer

Is SysExtension framework better than switches?

(0) ShareShare
ReportReport
Posted on by 1,550
Hi,
 
I want to know the advantages of using SysExtension over switches? Is the preformance  better?
 
Or is there a reason why i should stick to switches?
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,817 Most Valuable Professional on at
    Is SysExtension framework better than switches?
    This was already discussed in your own thread SysExtension framework mere two days ago.
     
    Let me repeat it once more:
     
    With these frameworks, the code creating instances don't need hard-coded names of classes. It lets a framework to find the right subclass based on some parameters.
     
    Here you can find more information about SysExtension framework, including an example: https://community.dynamics.com/blogs/post/?postid=31bbc085-ba95-4f75-a82a-de52a867005a.

    It's also important to mention that if you use a switch statement, such code can't be extended. But these frameworks do support extensibility, because you'll simply create a new and you don't have to change the method creating instances.

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,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans