Tuesday, April 5, 2011

Hide the content pane in Ax 2009

Execute below code to hide the content pane in AX 2009.

static void hideContentPane(Args _args)
{
#WinApi
HWND contentPane = WinApi::findWindowEx(WinAPI::findWindowEx(infolog.hWnd(), 0, 'MDIClient', ''),0,'ContentFrame','' );
;
if (contentPane)
WinApi::ShowWindow(contentPane, #SW_HIDE);
//Change to #SW_SHOWNORMAL when you want it back
}



/Ashlesh

Get the current CallStack in X++

Hi,

You can get the current call stack in X++ code anywhere in any module.

Container con;
str coninfo;
con = xSession::xppCallStack();
coninfo = con2str(con);
info(coninfo);

Hope it helps.

/Ashlesh