Session for application

Is there such think in AX application: SESSION variable use like in web application?
In PHP you can manipulate session variables to store information for that connected user until his browser is close. In AX is there a way to store data that would be accessible after the form is closed? I would rather not save the information on a disk. Just to keep this data until they close the application.


Hi Dominic,

SysGlobalObjectCache in AX 2012 is an option for you -

I will be careful going down this route though. It not careful it could lead to memory issues which are difficult to trouble shoot.

Just curious - what kind of info are you looking to store in cache?

Also this was discussed here -

Ok thanks for the 2012 solution.

Is there a solution for Axapta version 3?

Sessions in PHP deals with the stateless environment, which is not actually the case in AX. Until you close AX client, you’re in a single session. And by the way, you can do a lot of things without opening any form at all.

The actual question is where to store your data. There are some truly global classes that you could modify, such as Info class (accessed by infolog global variable). But changing these classes would cause you troubles with upgrades and it would be generally ugly. :slight_smile: These classes actually hold instances of SysGlobalCache class that you can use for your purpose. See Global variables post on mfp’s blog for an example.

By the way, you recently asked about Map class - that’s how SysGlobalCache is implemented.

Well thanks! Good work from you guys, lot of reading on my side…[8-|]