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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Using pre/post event handlers on Private Method checkAllowEditWhenCheckPrinted of table table LedgerJournalTrans

(0) ShareShare
ReportReport
Posted on by 85

I have some customise code in checkAllowEditWhenCheckPrinted(container _cacheKey, boolean _newVoucher) method of an existing table LedgerJournalTrans and its a private server boolean Method. I am trying to move all the customisation from the method. Is it feasible using pre/post event handlers for checkAllowEditWhenCheckPrinted() method?
And if so, how can I return a boolean value because the return type of method is boolean from pre/post event handler?

Or is there any alternate better way to achieve this ?

*This post is locked for comments

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

    This isn't possible - you can't add event handlers for non-public methods (unless they explicitly support it by using the Hookable attribute).

    Otherwise you could set the return value in your event hander like this:

    public static void MyEventHandler(XppPrePostArgs args)
    {
        args.setReturnValue(false);
    }
  • AnoopNair Profile Picture
    85 on at

    Thanks Martin

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

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans