The way to shutdown axapta using X++!

Hi,All I found a simple way to shutdown axapta, for your reference!! public static void shutdownAxapta() { SysGlobalCache cache = appl.globalCache(); info info; ; cache.set(classstr(info), identifierstr(Autologoff), true); info=new info(); info.shutDown(true); } Enjoy it! Andy.

Hi Andy That was a nice one. Also there is another way 1) If you want to shutdown Axapta with dialog infolog.shutdown(false); 2) If you want to shutdown Axapta without dialog infolog.shutdown(true); Regards Harish Mohanbabu

Hi guys,

how to shutdown and close ax using session id? for example, I open ax client and then the session id is 5 then when i open again ax client, i want to close and terminate the session id 5 and open a new session id 6. is this possible? or is there any other approach of doing this? please help. asap.

Thanks!

Regards,

AML

Hi!

I already terminated the session id 5 and open a new session id 6 but the problem is, session id 5 is still visible and I dont know how to close it.

here’s my code:

if(dlg == DialogButton::Yes)

{

session = new session(variable); //SELECT WHAT SESSION TO TERMINATE

IF(session)

{

session.terminate(session.loginDate(), session.loginTime());

}

}

else

{

this.shutDown(true); //close the new session id

}