The Role Center in Dynamics AX 2009 is based on the Dynamics AX 2009 Enterprise Portal. As soon as you install Enterprise Portal the Role Center will also be enabled.

If you do not want to use the Role Center you can hide it by going to Administration | Setup | Internet | Enterprise Portal | Web sites (EPWebSiteParameters Form) and clear the content of the text field “Web site used to display Role Centers in the Dynamics AX client”. If the field is empty no Role Center will be displayed and the “Home” module will also not show up.

However, what if want to turn off Role Center only for some users but not for all? This is unfortunately by default not possible!

While there exists Security Keys called RoleCenter and RoleCenterPeriodic those don’t control the access to Role Center, they just control one aspect of Role Center: The Cues web part

You can however with a small X++ code modification implement a possibility to “hide” Role Center for some users only. Before going into detail, let me start first with a short overview how the Dynamics AX Client is building the URL for Role Center...

 

The URL of the Role Center page is consisting of three components:

[EP Web Site URL][Role Center Page][Parameter]

Example: http://sharepoint/sites/DynamicsAx/Enterprise%20Portal/EPDefaultRoleCenter.aspx?WCMP=CEU&RUNONCLIENT=1

The EP Web Site URL and the Role Center Page are returned from X++ methods, the combination of all three components happens however in the Dynamics AX Client Kernel. If you wonder what the parameters are about, they specify the default Company Account and hide the typical SharePoint navigation layout like menus.

The EP Web Site URL is returned from: AOT\DataDictionary\Tables\EPGlobalParameters\Methods\homepageSiteURL

The user’s individual Role Center Page is returned from: AOT\Classes\ProfileManager\getCurrentUsersHomepageURLPath
(You can access a ProfileManager class instance form: AOT\Classes\Info\profileMgr)

 

In order to show Role Center only for some users we can make a small modification in the method that returns the EP Web Site URL:
   AOT\DataDictionary\Tables\EPGlobalParameters\Methods\homepageSiteURL

This method does already contain some code to check if the Upgrade Checklist is completed and hides Role Center if this is not the case (see also: Role Center is no longer showing up after installing an Application Roll-Up package). So in order to hide Role Center this method has simply to return an empty string.

The following X++ code (for example entered directly after return '';) is hiding Role Center for all users that are member of the user group “RCDisabled”:

   ...
   if (UserInfoHelp::userInUserGroup(curuserid(), 'RCDisabled')) 
      return '';
   ...

 

--author: Alexander Lachner
--editor: Alexander Lachner
--date: 13/07/2010