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)

#define.CurrentVersion(??)

(0) ShareShare
ReportReport
Posted on by 30

Dear All,

In calss we write generally Pack() and UnPack() methods.

In class decleration we declare the macro like :

#define.CurrentVersion(3).

#define.CurrentList

Can you please let me know what the numeric value 3 or whatever we put represent here?

Please give me more shed on this.

Thanks!

Arpan

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Macro currentVersion is for the version of the data and currentList is to store the values we want. The default value for #CurrentVersion is set to 1 by the compiler and it is the version stored in the cache by currentlist. If we add one field to the list, then we need to increase version by 1 (or with our choice but the version must differ numerically other than 1 like #define.currentVersion(3) and so on) as cache knows version 1 has 1 variable, 2 for 2 variables and so on.

    Please refer this link:

    axlearning.blogspot.com/.../get-last-form-values-in-dynamics-ax.html

    Hope this information helps you.

  • @rp@n Profile Picture
    30 on at

    Thanks Chaitanya,

    That means if i added 5 variables in CurrentList then currentVersion should be

    #define.CurrentVersion(5) or if 6 then it should be #define.CurrentVersion(6)

    Is't correct?

    Note : If it's mismatched means variables in currentList 6 and i put current version(2) then what will happened?

    Please give me more shed on this.

    Arpan

  • Verified answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    It will not throw an error but in general, its recommended like that.
    Also, we can maintain different versions based on the list of values we want to store.
    You can check methods classDeclaration and unpack of class BOMROuteCopyJob and CustInterestCreate to see
    how different versions are maintained and retrieved based on the requirement.

  • @rp@n Profile Picture
    30 on at

    Thanks Sukrut and Chaitanya

    Finally one thing this concept is only for AX 2009 or AX 2012 also. Because in AX 2012 i didn't see.

    Please give me more shed on this.

    Arpan

  • @rp@n Profile Picture
    30 on at

    Thanks Sukrut

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Along with AX2009, its applicable for other versions also. But in AX2012, BOF(Business Operation Framework) or SysOperation framework is introduced as a future replacement for RunBase and RunBaseBatch framework.

    Please refer following links:

    (From RunBase to SysOperation : Business Operation Framework)

    daxmusings.codecrib.com/.../from-runbase-to-sysoperation-business.html

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