Notifications
Announcements
No record found.
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
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).
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.
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.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 503 Most Valuable Professional
André Arnaud de Cal... 434 Super User 2025 Season 2
BillurSamdancioglu 278 Most Valuable Professional