Friday, 5 August 2016



Maintenance Mode 

Hi All,

Microsoft Dynamics AX7 includes a new system-wide setting that is named maintenance mode. When maintenance mode is turned on, it provides a safe way for system administrators to make system changes that might affect system functionality. For example, configuration keys can be enabled or disabled. While maintenance mode is on, only system administrators and users who have the Maintenance mode user role can sign in to the system. By default, maintenance mode is turned off.

When maintenance mode is off, you can’t edit the License configuration page, as shown in the following screen shot.


You can turn on maintenance mode locally by running the following command.

J:\AosService\WebRoot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe -bindir
J:\AosService\PackagesLocalDirectory -metadatadir J:\AosService\PackagesLocalDi
rectory -sqluser sa -sqlpwd Root1 -sqlserver DEMO-398AD61AC8 -sqldatabase AxDB -
setupmode maintenancemode -isinmaintenancemode true


The following table describes the parameters that are used in this command.
Parameter name
Description
–setupmode maintenancemode
Use this parameter to inform the setup tool that the system will be put into or taken out of maintenance mode.
–metadatadir
Use this parameter to specify the metadata directory. You should use the default packages directory.
–bindir
Use this parameter to specify the binaries directory. You should use the default packages directory.
–sqlserver
Use this parameter to specify the Microsoft SQL Server. For one-box environments, use a period (.).
–sqluser
Use this parameter to specify the SQL Server user. You should use AOSUser.
–sqlpwd
Use this parameter to specify the SQL Server password.
–isinmaintenancemode
Use this parameter to turn configuration mode on or off. Use true to turn it on and false to turn it off.


After the instance of Microsoft Dynamics AX Application Object Server (AOS) is restarted, the system will be in maintenance mode. You can then enable configuration keys, as shown in the following screen shot.

You can turn off maintenance mode by running the following command.

J:\AosService\WebRoot\bin\Microsoft.Dynamics.AX.Deployment.Setup.exe -bindir
J:\AosService\PackagesLocalDirectory -metadatadir J:\AosService\PackagesLocalDi
rectory -sqluser sa -sqlpwd Root1 -sqlserver DEMO-398AD61AC8 -sqldatabase AxDB -
setupmode maintenancemode -isinmaintenancemode false


Hacking DAX’ing J..

Monday, 20 June 2016

Setup and Configuration of Visual Studio - AX7


The first time you use using Visual Studio to develop with AX, you will need to complete some basic configuration.

The first thing to note is it can be hosted locally or in the cloud using Microsoft Azure. Secondly, a minimum of 16 gigabytes of RAM is recommended along with two CPU cores for a smooth development environment.  However, the more RAM and CPU cores you have will translate into faster compile times. 

There are a few settings we want to configure in Microsoft Visual Studio that will make the development experience with AX a little smoother.

Configure Visual Studio


1.  Open the Visual Studio.

a.       Right-click the Visual Studio 2015 icon on the desktop.
b.       Click Run as administrator.

2.  Set  the Text Editor Options.

a.       Click Dynamics 'AX 7'.
b.       Click Options..
c.       Expand the Text Editor node.
d.       Click the All Languages node.
e.       Under Settings, select the Word wrap check box.
f.       Select the Line numbers check box.
g.       Collapse the Text Editor node.

3. Set  the Best Practice Options.

a.       Under Dynamics 'AX 7', select the Best Practices node.
b.       Select Microsoft.Dynamics.AX.Framework.BestPracticeFramework.UIRules.
c.       Make sure that ,
     i.   Microsoft.Dynamics.AX.Framework.CodeStyleRules 
     ii.  Microsoft.Dynamics.AX.Framework.DataAccessRules.
     iii. Microsoft.Dynamics.AX.Framework.DataEntityRules.
     iv. Microsoft.Dynamics.AX.Framework.DeprectatedElementsRules.
     v.  Microsoft.Dynamics.AX.Framework.MaintabilityRules.
    vi.  Microsoft.Dynamics.AX.Framework.StaticCodeValidationRules.
     are selected.

4. Set Projects Options.

a.       Click the Projects node.
b.       Select Organize projects by element type.
c.       Click OK.