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

X++ Can I skip default function?

(0) ShareShare
ReportReport
Posted on by 962

Hi All

I have a question is that possible to skip D365FO default function? I know we can use COC to add logic before or after default function. However, can I skip default function in X++?

Best Regards,

JustZM

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at

    Do you mean not to call 'next'? It's not possible, with a few exceptions (methods decorated with [Replaceable] and some system methods, such as write() on form data source).

  • JustZM Profile Picture
    962 on at

    Hi Martin. Thank you for your reply. Yes, I know when I use COC, I have to call 'next' and run it, so COC is not what I need. Because I got a requirement that needs to skip some default functions like "void boolen Isvisable()". I want to confirm it is possible or not.

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,079 Super User 2025 Season 2 on at

    Hi JustZM,

    Like Martin mentioned, check if there is an attribute [Replaceable]. If not, it can't be overridden with CoC. Depending on the full scenario, you can probably replace larger parts of the coding. E.g. use a menu extension to call your own class instead of the class from Microsoft.

    Before you will go into that direction, check the possible impact and if it really makes sense to bypass the standard behavior. Also think of updates where Microsoft will add features of apply fixes on the standard logic. You should evaluate the changes and will have probably higher costs to follow the Microsoft updates. Even don't forget that you might be out of support if data will be inconsistent due to bypassing standard Microsoft logic.

  • Alex VN Profile Picture
    1,994 on at

    Hi,

    I would like to also add that in case you want to by skip the method void boolean Isvisable(), it is not possible but you can think of another approach that you can try to change the value that the method returned like this:

    boolean ret = next IsVisible();

    ret = true;

    return ret;

    With this one, you still call the standard method with next call but you can manipulate the data returned and "skip" that check.

    Hope this helps.

    Regards,

    Anh Ong

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 503 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans