web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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)
  • 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.

  • 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.

  • 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.

  • 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 Martin,

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

  • 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.

  • Verified answer
    Martin Dráb Profile Picture
    238,322 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.

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

News and Announcements

Season of Giving Solutions is Here!

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

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Volodya Profile Picture

Volodya 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans