Thursday 5 June 2014

Installing Dynamics AX 2012 R3

Installing Dynamics AX 2012 R3
Prerequisites:
1. Windows Server 2012 R2
2. Microsoft visual studio 2012 + SP1
3. Microsoft SQL Server Enterprise Edition + SP1
4. Microsoft office 2013
5. Microsoft project 2013
------------------------------------------------------------------------------------------------------------
Now let's start installing Wish you good luck.
--> Log on to Windows Server 2012 with Admin user
1. Go to Active directory --> user and computers
Ø  Service Accounts --> Add new Group
Ø  Add below users
o   SSAS
o   SQLDB
o   SSRS
o   AXAOS (AOS Admin)
o   AXBCP (Business connecter)
o   AXWKFL (Work flow)
§  To add user Rt click on Service Accounts + new
§  Give Full name
§  user name
§  password (please note the password, as we need it in coming process)
§  check the box (Password never expire)
Ø  Add above users to Group
Ø  Give Administrator permission to the above group.

2. SQL Server Configuration Manager
Ø  SQL Server (MSSQL Server)
Ø  Properties
Ø  Change Account to "SQLDB" the one which we created in previous step.
3. Now Go to Microsoft Dynamics AX2012 R3 setup file and run as Administrator
ü  Select option Single Computer
ü  Data base
ü  AOS
ü  click next.
ü  Give the Domain and user name (AXAOS)
ü  Click Finish.
ü  Now install Client components.
ü  Click Next --> Next --... Finish.
Now you are done with AX AOS and Client.
4. Lunch AX Run--> ax32

compile the application and finish the check list. 

Wednesday 4 June 2014

EP: DataSetLookup issue with sysDataSetLookup.parmQuery(query)

EP: DataSetLookup issue with sysDataSetLookup.parmQuery(query)

Recently I have faced a strange issue in Dataset lookup method and come to know that there is come issue with " sysDataSetLookup.parmQuery(query) " when it is called from EP.

The actual issue was, when we pass the query as parameter to the method  " sysDataSetLookup.parmQuery(query) ", the query range are not applied and it will fetch all the records without any query filter. It is a strange issue and happens inconsistently.

And I could make out solution for the about issue.
we need to add the range at the end instead of passing it as a parameter, as shown below.

Actual dataset Lookup method:
void dataSetLookup(SysDataSetLookup sysDataSetLookup)
{
    QueryBuildDataSource qbd;
    QueryBuildRange qbr;
   
    List list = new List(Types::String);
    Query query = new Query();

    // Add the table to the query.
    query.addDataSource(tableNum(FCMRooms));

    // Specify the fields to use for the lookup.
    list.addEnd(fieldStr(FCMRooms,RoomName));
    list.addEnd(fieldStr(FCMRooms,RoomType));
    list.addEnd(fieldStr(FCMRooms,InService));

    // Supply the set of lookup fields.
    sysDataSetLookup.parmLookupFields(list);

    // Specify the field that is returned from the lookup.
    sysDataSetLookup.parmSelectField('RoomName');
       
    // Add range
    qbd = query.addDataSource(TableNum(CustTable));
 
    qbr = qbd.addRange(FieldNum(CustTable, AccountNum));
    qbr.value(">=4000"); // Default operator is ==.

    // Pass the query to the SysDataSetLookup so that the query is used.
    sysDataSetLookup.parmQuery(query);
}
Modified  dataSetLookup method:
void dataSetLookup(SysDataSetLookup sysDataSetLookup)
{
    QueryBuildDataSource qbd;
    QueryBuildRange qbr;
   
    List list = new List(Types::String);
    Query query = new Query();

    // Add the table to the query.
    query.addDataSource(tableNum(FCMRooms));

    // Specify the fields to use for the lookup.
    list.addEnd(fieldStr(FCMRooms,RoomName));
    list.addEnd(fieldStr(FCMRooms,RoomType));
    list.addEnd(fieldStr(FCMRooms,InService));

    // Supply the set of lookup fields.
    sysDataSetLookup.parmLookupFields(list);

    // Specify the field that is returned from the lookup.
    sysDataSetLookup.parmSelectField('RoomName');
       
    // Add range
    qbd = query.addDataSource(TableNum(CustTable));
 
    qbr = qbd.addRange(FieldNum(CustTable, AccountNum));
    qbr.value(">=4000"); // Default operator is ==.

    // Pass the query to the SysDataSetLookup so that the query is used.
    sysDataSetLookup.parmQuery().addDataSource(TableNum(CustTable)). value(">=4000");
}



Hope this helps .. Happy Learning.

Update NuGet package to new MS D365FO version

1. Import the NuGet package files from LCS for that particular version please take the PU version files only. a. Goto LCS-->Asset Libra...