Wednesday, February 19, 2014

WinAPI::ShellExecute() for a JAR file for Banking application

Recently came across a scenario where a banking a hash program needs to be called to encrypt a payment file before sending to the Bank. The bank had just changed the hashing program from an .exe file to a .cmd, this file inturn was a batch script file which would validate and then call a JAR file with the appropriate parameters.
Issue:- While executing the .cmd file from the Command prompt the JAR file runs and hashes the file correctly, but when we use the Dynamics AX to call the .cmd file the JAR file is not executed. The command used was WINAPI::ShellExecute(Command, Parameters);

Investigation :- After preliminary checking from both the AX and command prompt we guessed that the .cmd file was not being executed due to a failure in the calling mechanism. We tried different approaches by calling the cmd.exe and then pass the parameters to mimick the manual approach. But somehow the command prompt opened up but did not execute the JAR file. Then next approach was to add all the commands inside a batch script file which would call the JAR file, so from AX we wouldn't need to specify the details in AX but would just call the batch script file. Still the execution of JAR file from AX was not happening even though we could execute the file manually.
After a lots of Google searches on the execution environment with ample trial and error my colleague identified that the issue was due to JRE execution is the root cause. Meaning that Dynamics AX looks for the Java Runtime under the 32 bit folder(under C:\Program Files (x86)\Java\bin) instead of the 64 bit installed in Windows server 2012 machine. This could be because of the legacy run time approach followed since the older versions executing the JAR files.

Conclusion:-
Install the 32 bit Java runtime on the server.

Notes:
AX job would look something like this to call the WINAPI::ShellExecute(command); where the command = @D:\TestScript.bat

And test script  batch file will have,
CD D:\HashFile\
D:\HashFile\HashProgram.cmd parm1 parm2 parm3 parmx....
Another thing to note is to link the batch file to the folder using CD D:\HashFile\ before executing the .cmd file. To point to the correct execution folder before running the command.


Add on:- For those who are trying to execute exe as a process from X++, do find an excellent post from Bo Jensen at his blog post - X++ run a process with user credentials



Thursday, February 13, 2014

Publish-AXReport : SSRS Deployment Error 'Domain/User' is not recognized

I faced this issue during deployment of all the default SSRS report when I was migrating the application from Development environment to UAT. The issue occurs due the previous AOS sessions that are present in the Table SysServerSessions table. This table will not be listed in the AOT and you will be able to access this table for viewing the records from SQL management studio, alternatively you can also create a dummy form and access the table from datasource.

There is no problem in deleting the records in this table as the records are automatically inserted by the AOS when AOS service starts up. 

Conclusion:- Turn off the AOS and clear the records from SysServerSessions table. Republish the SSRS reports it'll publish correctly.


Wednesday, February 12, 2014

Report Deployment Error - Value cannot be null. Parameter name : explicitConfiguration

Today faced an SSRS error when deploying on of the reports in our client environment on AX 2012 R2 CU6

The error is exactly similiar to the issue described in this blog. Please refer for the error event log and the detailed description about the WCF service artifacts failure.

Conclusion: Fix the endpoint or deactivate the failed service group and re-try the report deployment again.


Dynamics AX 2012 R3 Training Blitz

Dynamics AX 2012 R3 is just around the corner, and is planned for GA by May 2014.

There some initiatives from the Microsoft Product team for familiarizing the product before GA. Some of the avenues are Technical & Product Conferences and Microsoft Connect for CTP. Recently there are some very public R3 Training Blitz webcasts for showcasing what can be expected in the new release. The webcasts are free and can be joined by everyone, during the conference the team diligently answers the questions from the viewers. Also the first webcast for the R3 is recorded and out on the Youtube which is a great way to reach out to all those who would have missed it.

The second sessions are planned for Feb 26 and Feb 27, please do join in as it has specific segments for the verticals including Retail & Manufacturing. I am very interested and keen to know the new things that are being implemented in the R3 Retail after seeing some of the significant changes in the CTP sessions.
Here is the link for you to join the Dynamics AX virtual events, do signup and enjoy the sessions.

Just incase if you have missed the Part 1 of the Traning blitz webcast, catch it on Youtube here.


Wednesday, November 6, 2013

Release of AX 2012 R2 CU7 and upcoming release of AX 2012 R3 on Cloud


AX 2012 R2 CU7

The release of CU7 for R2(KB2885603 - 6.2.1000.4051) signifies a lots of fixes, feature additions and updated user experience of the core modules. Please find below link from the Microsoft community for the detailed changes in each of the modules.

AX 2012 R3 released in April 2014

A good MSDN article on what we can expect on the upcoming new functionalities on both the verticals and core modules. Most importantly the AX 2012 R3 can also be hosted on the cloud using Windows Azure services. This means that the Dynamics AX can be hosted at a remote site and customers can access the services as a subscription.
The folks attending the Technical conference in February will seem to have hands on access to R3, that would be really interesting to hear about their thoughts.
Here is the MSDN community link where the new features are briefly described.
The tag line of AX 2012 R3 seems to be
1. Engage Customer on their own terms
2. Satisfy changing customer needs
3. Serve your customers better and expand your business



Friday, October 4, 2013

SQL Synchronization Errors


I was facing some AX synchronization issues this week for my R2 instance which had Projects module license configuration off. Below are the errors that were generated during the sync from AOT.

ProjJournalTransHourUnpostedView
Error
Synchronize database Specified field Qty of datasource ProjJournalTrans does not exist in the database or the configuration key on the field or on Extended Data Type used by the field is off. The view ProjJournalTransHourUnpostedView can not be created in the database.
ProjTransBudgetCube
Error
Synchronize database Specified field StatementPLHourCost of datasource ProjParameters_1 does not exist in the database or the configuration key on the field or on Extended Data Type used by the field is off. The view ProjTransBudgetCube can not be created in the database.
ProjTransBudgetCube
Error
Synchronize database Specified field StatementConsumpHourCost of datasource ProjParameters_1 does not exist in the database or the configuration key on the field or on Extended Data Type used by the field is off. The view ProjTransBudgetCube can not be created in the database.
ProjTransPostingCube
Error
Synchronize database Specified field StatementPLHourCost of datasource ProjParameters_1 does not exist in the database or the configuration key on the field or on Extended Data Type used by the field is off. The view ProjTransPostingCube can not be created in the database.
ProjTransPostingCube
Error
Synchronize database Specified field StatementConsumpHourCost of datasource ProjParameters_1 does not exist in the database or the configuration key on the field or on Extended Data Type used by the field is off. The view ProjTransPostingCube can not be created in the database.

All the errors are pertaining to the views created in the backend for the Projects module. Did the usual checks for the ProjJournalTrans.Qty field and the related EDT config settings, but still the errors were not resolved. Also explored turning on/off for each of the nodes in Configurations form to check if the error can be removed and direct queries to the SQLDictionary table. Then checked in the AX forums and came to know that this is a known issue in Dynamics AX 2012 R2, and can be safely ignored as AX checks the Project module configurations for these views. However there is no data loss due to these views hence this issue is not quite serious.

The original explanations can be found under these links at support forum.



Tuesday, October 1, 2013

Dynamics AX 2012 Retail Demo VM 3 - POS users list

A quick and a handy reference for the Dynamics AX 2012 Retail POS users list, avoiding time consuming search in the application for the different demo stores, users and access profiles. Please note this list is applicable only for Dynamics AX 2012 R2 Demo VM version 3.0. The default password for the users is 123

Seattle (AW)
000150 - Sales associate
000154 - Store manager
000165 - Sales associate
000175 – Non-drawer

New York (AW)
000152 - Sales associate
000156 - Store manager
000159 - Sales associate
000179 – Non-drawer

Boston (Electronics)
000100 - Store manager
000110 - Sales associate
000111 - Sales associate
000120 – Non-drawer
Paris (AW)
000221 – Store manager
000222 – Sales associate
000229 – Sales associate
000225 – Non-drawer
Houston (Fabrikam)
000160 – Store manager
000161 – Sales associate
000164 – Sales associate
000168 – Non-drawer