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 :
Microsoft Dynamics AX (Archived)

How to use Events for Non-Hookable methods in D3fO

(0) ShareShare
ReportReport
Posted on by 567

Hi,

How to use events for Non-Hookable methods in D3fO for extension process.

I am trying to use event but it's throwing error 

"Pre or post event handlers can only be created on hookable methods. Hookable methods are non-abstract methods that are either public or have been attributed with Hookable(true)."


Please help.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    238,769 Most Valuable Professional on at

    You can only add event handlers to methods that are public or decorated with the Hookable attribute. Otherwise you can't do that.

    If you can customize the method, you can make it hookable.

  • Udit Profile Picture
    567 on at

    Hi Martin,

    Thank you for your quick response.

    I want to add a small logic in createData2Controls method on EcoResProductCreate form. How can I achieve this?

    Thank you.

  • Udit Profile Picture
    567 on at

    Hi Martin,

    As you mentioned, we can customize the method, that means overlaying and overlaying is not recommended.

  • Mea_ Profile Picture
    60,286 on at

    Hi Udit Kumar,

    Application Suite does not have enough extension points and often it's not possible to avoid overlaying when you deal with App Suite.

  • Udit Profile Picture
    567 on at

    Hi Ievgen,

    Thank you for your response.

    What should you recommend do I use overlaying or not? As per I know we shouldn't use overlaying because overlaying will affect in future up gradations.

  • Verified answer
    Mea_ Profile Picture
    60,286 on at

    We asked MS guys about this couple of times and they says that there is no way to completely avoid overlaying of App Suite now, in future they will do refactoring and add extension points, but now it's impossible to customize some places with extensions only.

    They recommend to reduce overlaying by adding delegates or making methods hookable.

  • sumit k Profile Picture
    on at

    Hi, You can either ask microsoft to make this method Hookable or write the logic in form initialized event handler. I see that the said method is private and is called only from the form init() method. So, if your logic works fine even after calling all the private methods, you can use the form event handlers.

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans