How to ShutDown Axapta Dynamically

How to ShutDown Axapta Dynamically

i have searched the code for using shutdown Axapta use this code in job

void ShutDownAxapta()
{
SysGlobalCache cache = appl.globalCache();
info info;
;

cache.set(classstr(info), identifierstr(Autologoff), true);

info = new info();
info.shutDown(true);
}

Hi

You can also go to user option under Tools and give duretion in minutes in automatic shutdown filed. So if AX is inactive for that many minutes it will shut down, Make sure you have admin. access for that.

Thanks

Rajesh Kumar S

Hi Nitesh,

U can do like this…

infolog.shutDown(true);