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)

Extension from Private Class method in Ax7

(0) ShareShare
ReportReport
Posted on by

Hi friends, 

        I need to extend Private method from standard class LedgerAccuralTrans_Calendar to our extension class using post-event handler of that private method.

 Photocopy.png

Thanks And Regards

Priyabrata das

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Fedir Kryvyi Profile Picture
    1,026 on at

    Unfortunately you cannot extend or handle private methods.

    The only thing that you can try to do is to add your custom logic right after the method is called in caller method/code.

  • Suggested answer
    Sheikh Sohail Profile Picture
    6,125 on at

    You can not override the private method as it mentioned as private in code, but if you think that standard private method should be public then you can create Extension Request to Microsoft...

    There is an alternate way to call private method using reflection... it the provided blog works for you please mark this answer suggested.

    d365technext.blogspot.com/.../private-protected-and-public-attribute.html

  • nmaenpaa Profile Picture
    101,160 Moderator on at

    You should not use reflection, as that is not a supported way and your solution will break if Microsoft changes their private code.

    By the way, what is your business requirement? Why would you need to change the information that the method nextPeriodStart returns?

  • Sheikh Sohail Profile Picture
    6,125 on at

    Thank you nikolaos--

    The same thing if you mentioned in my comments >

    if you think that standard private method should be public then you can create Extension Request to Microsoft...

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