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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Can we skip parents methods in certain classes

(0) ShareShare
ReportReport
Posted on by 1,552
Hi,
 
 
So let's say we have base class A
Class B is child of A
Class C is child of B
 
And let's say the base class A has a method with some
logic called commonMethod
 
In class B that extends A, I don't want to apply the logic in the common method so i overrided it and returned nth
 
Now in class C that extends B...i want the logic of the method in the base class
 
Can i let class C skip B in this certain method and look at the base method?
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    238,789 Most Valuable Professional on at
    No, it's not possible. You'll need to look a better design.
     
    For example, class A may have a method that decides whether the logic should be run or not. It would return true in class A, class B would override it and return false and class C would override it again and return true.
     
    Or maybe C shouldn't extend B at all, if the logic of its current parent (B) isn't suitable.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 512 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 386

#3
Adis Profile Picture

Adis 259 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans