Nov 1, 2012

Error “Concurrent number of AOS for this application Exceeds the licensed number”

Error “Concurrent number of AOS for this application exceeds the licensed number”

When we try to start the service of Ax2009 instance it fails and throws an error “Concurrent number of AOS for this application Exceeds the licensed number” in the event log.  To resolve the issue, follow below steps
  •  Open SQL Server Management Studio and select the Dynamics Ax database used for the instance.
  •    Select New query
select * from dbo.sysserversessions where status = 1
  • Change the value by running following query
            update dbo.sysserversessions set status = 0 where status = 1

           Now you should be able to start AX2009 service.

Aug 27, 2012

How to count the number of records in a report in ax 2009.

Sometimes we need to calculate the percentages in the report basing on the number of records which are displaying in the report. To achieve that first we need to calculate the number of records in report.
By using  SysQuery::countLoops() method we can calculate the number of records.

Actually i used many tables in this particular report but the main table in SalesTable. i am building the dynamics query and joining all rest of the tables into this table. so my main table in this report is SalesTable and my query name is queryRun_1. I used this query in the fetch method.
the code should be as shown below.

  while(queryRun_1.next())
         {
            SalesTable = queryRun_1.get(tablenum(salesTable));


             this.send(SalesTable);


           NOR =  SysQuery::countLoops(queryRun_1);

         }

countLoops is the method which is used to count the number of loops while query is executing from the class SysQuery.
And NOR is just a variable to count the number of records which is declared in class declaration so that we can used it anywhere in our report.

Aug 25, 2012

Security Keys in Ax


Security Keys in Ax

Dynamics Ax provides following keys to provide the security for application

1. License Keys:
First Level Security, specifies what all features/modules/development tools we can access in the standard product. License Keys will be used after installation to unlock the product. License Keys will be issued by the Microsoft for partners/vendors to develop vertical/generic solutions.

2. Configuration Keys:
Second Level Security, To Enable/Disable the object/feature for all the users.

3. Security Keys:
If you want to enable/disable object/features to group of users.

4. Record Level security:
Basically it deals with the data, if you want to restrict the viewing of records per user group than we setup record level security.