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, ...
Answered

X++ Can I skip default function?

(0) ShareShare
ReportReport
Posted on by 972

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

  • Suggested answer
    Martin Dráb Profile Picture
    241,635 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
    972 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
    308,189 Super User 2026 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 274 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 219

#3
Subra Profile Picture

Subra 202 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans