Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Global variables on an extension class

Posted on by Microsoft Employee

Hi,

I have an extension class from "PriceDiscAdmCheckPost", and I have created a method in order to return the value of a global variable (JournalNum) from the base class.

But when I try it, I receive an error because I have don't acces to this variable. Is this because for default the variables are declared as private in the base class?

In this case, how can I retrieve a global variable using an extension class?

Thanks!

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Global variables on an extension class

    Hi Sukrut,

    Thanks for your help, we had use reflection to accessing global variables.

    However, is there any way to modify the value of these variables using reflection?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans