Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

Extending the Controller Class

Posted on by

Hi, I've created a custom design for the sales confirmation report.

I extended controller class like this...

class SalesConfirmControllerExt extends SalesConfirmController

Is using chain of command the preferred method or does it matter?

Thanks in advance

  • brianmaric Profile Picture
    brianmaric on at
    RE: Extending the Controller Class

    Thanks Martin, that answers my question

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    RE: Extending the Controller Class

    What you did means that now you can call your new controller from your code, but all the existing code will keep using the original class. It's a great option if you want both classes co-exist and choose which one or the other as needed. But if you want existing code to use your class, you would have to extend the place or places where new instances are created.

    If you use CoC, you change the behavior of SalesConfirmController itself. You don't have two separate classes to choose from, but you don't have to worry about instantiation.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans