Some classes on AX have their methods as “protected” and this blocks the possibility of the use of “event handler”.
Customize the class, before the declare of the method use the attribute Hookable = true as below:
X++:
[HookableAttribute(true)]
protected void loadModule()
{
With the hookable attribute as “true” now you have the option to create the event handler.