Wednesday, 27 February 2013

Find out if the user is an administrator

Today I wanted to find out if the logged in user in Dynamics AX 2012 is an administrator so I did a bit of search and found out the solution.

SecurityRights secRights = SecurityRights::construct();

if(secRights.isSystemAdministrator())
{
    info('User is an admin');
}


This posting is provided "AS IS" with no warranties. Use code at your own risk.

Saturday, 23 February 2013

Dimension framework in AX2012

Bill Frandsen from Microsoft Dynamics AX GFM team has published a series of posts on Dimensions in AX2012. It consist of 7 posts. I would strongly recommending going through these posts. The posts cover different areas of Dimension framework with showing how to set-up things in AX and then showing how it is saved in the database.

Ledger account combinations - Part 1 (Dimensions)
Ledger account combinations - Part 2 (Dimension enumerations, default dimensions)
Ledger account combinations - Part 3 (Structures and constraints)
Ledger account combinations - Part 4 (Advanced rules)
Ledger account combinations - Part 5 (Ledger dimensions (A))
Ledger account combinations - Part 6 (Ledger dimensions (B))
Ledger account combinations - Part 7 (Advanced topics)

This posting is provided "AS IS" with no warranties. Use code at your own risk.

Saturday, 16 February 2013

Navigation pane missing after adopting Ax2012 Feature pack

When we upgraded last year to AX2012, we decided not to implement feature pack. Later Microsoft recommended to adopt the feature pack (Microsoft Dynamics AX 2012 Feature Pack Release and The Microsoft Dynamics AX 2012 Feature Pack—Why You Should Adopt it Moving Forward.)

So finally we started work on it and everything was smooth until we restarted the AX2012 client. We were presented with the following screen


As you can see that there is no navigation pane and nothing else on the screen. Opening another workspace by pressing Ctrl+w would bring back the normal client screen. We reported the issue to Microsoft and it appeared a record was missing from RetailSetupLog. The problem will only surface when Retail configuration key is turned on. To fix the problem a record should be created (from within AX) with the following details

Description = Finished
RetailBuild = 6.1.1108.0
Name = SysCheckList_Upgrade

This posting is provided "AS IS" with no warranties. Use code at your own risk.