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 :
Finance | Project Operations, Human Resources, ...
Answered

How to skip extension method execution

(1) ShareShare
ReportReport
Posted on by 6,478
Hello,
let's say we have a standard ClassA, which has run method.
Then by some partner company it was extended and some logic added in the run method, let's say xxxClassA_Extension.
So, to simplify the question, let's say we have a checkbox, if the checkbox is active the process executing normally and if not active then we need to skip extension run method and only run original standard code.
Is it somehow possible without actually modifying the xxxClassA_Extension class?
Thanks
I have the same question (0)
  • Verified answer
    Layan Jwei Profile Picture
    8,112 Super User 2025 Season 2 on at
    Hi vuivui,

    I think it's not possible. The "if" condition needs to be done in the extension method.

    Thanks,
    Layan Jweihan

    Please mark the answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,069 Super User 2025 Season 2 on at
    Hi Johnny,
     
    Layan is correct. You can't change the behavior of the standard coding or a partner extension. It is impossible to control which extension will run first. You can try to find a place before or after this run method in classes that calls this method. You can then check if there is an option preventing running ClassA and run a copy of the class in your own model or maybe after all calls create an extension that corrects all actions like the original code.

    If you need more guidance, then please share details about the standard code and the code created by the partner. We might then better understand the scenario and guide if something would be possible or not. Anyway, you can also try to contact the partner company if they are willing to embed the checkbox and condition in their coding.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans