How to create GlobalCache(Session) in X++ AX 2009?
//Create Cache
void method()
{
SysGlobalcache globalCache;
str itemid;
;
globalCache=infolog.globalCache();
if(globalCache.isSet('System','X'))
itemid=globalCache.get('System','X');
}
// remove cache
void method()
{
SysGlobalcache globalCache;
str itemid;
;
globalCache=infolog.globalCache();
if(globalCache.isSet('System','X'))
globalCache.clear('System');
}
}
Comments