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)

Pre or post event handlers can only be created on hookable methods.

(0) ShareShare
ReportReport
Posted on by

Dear All,

I am getting this error while creting Pre/post event handler. please give a solution or alternet way.

thanks in advance.

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

8306.error.png

*This post is locked for comments

I have the same question (0)
  • Jie G Profile Picture
    Microsoft Employee on at

    Hi,

    Please refer to this: https://community.dynamics.com/ax/f/33/t/218894

  • Community Member Profile Picture
    on at

    Hi Ding,

    i already refered that link, but in my company they should not work in cust.. only have to work extension. is there any way ?

  • Community Member Profile Picture
    on at

    Hi sukru, 

    Thanks for your response, i read that document, i need to add code in class declaration in form. what can i do for that ?

  • Community Member Profile Picture
    on at

    Hi,

    I also need to add code in class declaration in form BudgetModel. what can I do for that ?

    As soon as I try to copy "Pre/post event handler", I get the 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).

  • Suggested answer
    PA-22040759-0 Profile Picture
    6,194 on at

    Here is an article about adding state variables to a form, using extensions: community.dynamics.com/.../code-behind-extension-forms-how-to-add-state-variable-and-override-methods-without-overlayering

    Maybe that can help you

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 24

#2
Michel ROY Profile Picture

Michel ROY 14

#3
Jagadabi Profile Picture

Jagadabi 6

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans