Pages

Monday, March 12, 2012

Preventing users from opening new workspaces

In AX 2009, before hotfix roll-up 6, AX has some issues when users open multiple workspaces with different company accounts.

I have seen issues where voucher numbers were pulled from the wrong company account and I have seen a data import going totally awry.

You can't completely prevent users from opening new workspaces through the security model, but you can add code that immediately closes these aging. Add the the following code to \Classes\Info\workspaceWindowCreated:

void workspaceWindowCreated(int _hWnd)
{
;
    // Put workspace window specific initialization here.
    // Begin -->
    if(xInfo::currentWorkspaceNum()>1)
    {
        Infolog.shutDown(true);
    }
    // End <--
}

No comments: