Hi. I've created an extension class of PriceDiscAdmCheckPost class (decorated by [ExtensionOf]) and I have placed there my custom methods, chain of commands methods and event handlers. However, as I compiled it, the best practice checker shows a warning message that says:
"Adding event handlers in extension classes is not recommended, please use instead a regular X++ class for that purpose."
I'm wondering why. I thought the goal was place every piece of custom code for one object in one extension class as much as possible. Due to this, I had to create another class that is not decorated by [ExtensionOf] just for my event handlers for that particular standard class.
If that's the case then, I'd like to ask how I would name my objects then? For my extension class, I named it "PriceDiscAdmCheckPostClassABC_Extension' where ABC is a custom model initials. But how about for my new regular X++ class that has my event handlers? I'm thinking of "PriceDiscAdmCheckPostClassEventsABC_Extension", but I'm not sure if that's the best way to name it. Please help, I can't find any other sources online regarding this matter.
Thanks.