Tuesday, January 15, 2013

Suggestions on Year End Closing and Trial Balance Report

Recently one of my customers complained about having zero (0) opening balances on the Trial Balance report for Balance Sheet accounts after year end closing process ran. Here are the suggestions and tips I had for him which might be useful for general audience.

1-  Closing Process Suggestions
a.       Close-of-year transactions” report under GL>Reports>Transactions can be used to see all the transactions occurred during the closing process. 

 



b.      Suggestions on the “GL>Periodic>Fiscal Year Close> Opening Transactions” process
                                                               i.      Enter a voucher number manually in the process. That makes it easier to track the transactions later.
                                                             ii.      Do no select “Use account for transfer of year-end result”. This checkbox is supposed to only show up if your primary address is Spain. Probably due to a bug, it shows up here. It is removed in the new R2 version. However, selecting or de-selecting it has no effect – yet I suggest not to select it.
                                                            iii.      As you see in the Opening Transactions form below the customer has a parameter setting to set the fiscal year status to “closed” automatically after the closing process finishes. This is coming from General Ledger parameters (please refer to suggestion 1-c)




c.       In “GL > Setup > General ledger parameters” under Fiscal Year Close fast tab – unselect the “Set Fiscal Year Status to closed” checkbox. Because this automatically sets the fiscal year status to closed after the process completes and a “closed” period cannot be “re-opened”. For instance, if there was an issue during this closing process and if you would like to rerun the Opening Transactions, you will not be able to run it in this case since the periods are already closed. Alternatively, you can set the status for fiscal periods to “On Hold” which prevents further transactions but also enables you to reopen if need be. (open GL>Setup>Ledger and click “Ledger Calendar” button which opens the Ledger Calendar form where you can set the status manually.




2-      Trial Balance Suggestions
a.       Do not forget to Update Balances before running a trial balance report. Prior to running a Trial Balance report go to “GL>Setup>Financial Dimensions>Financial Dimension sets” and click the “Update balances” button after selecting the financial dimension set you are going to be using in your TB report.



b.      This final suggestion explains why the Trial Balance report shows 0 opening balances even after updating the balances. This is kind of tricky. I personally think the name of the check box “Include opening”  is not intuitive and is misleading. If you select your Detail Level as “Summary”, then do not select “Include Opening” or “Include Closing” if you would like to see opening and closing balances reported in the summary header. These check boxes are meant to include opening and closing transactions in the transaction list when a “detailed” TB report is prepared.  Here is an explanation from MS what those checkboxes mean:


                               Based on these explanations, I think what you would like to do is to uncheck those options. And then you will get the following TB report:






                              Here is the result with opening balances reported as non-zero for the balance sheet account:
            
                             



Friday, January 11, 2013

AX 2012 R2 Demo - Help Server Issue

If you have installed AX 2012 R2 Demo Image to Hyper-V and received the following error message while opening help

"The location of the help server has not been specified. Contact your system administrator for assistance"


you need the set the "Help Service URL" in Help System Parameters - under System Administration > SetUp > System. The typical help service URL is "http://<host:port>/DynamicsAX6HelpServer/HelpService.svc" on Port 80. The host on the R2 Image is "DynamicsHelpServer".

Thursday, January 10, 2013

AX 2012 R2 Enterprise Portal not working on VM image on VirtualBox

If you have installed the AX 2012 R2 demo on VirtualBox and the Enterprise Portal or Role Center is not working, the fix might be as simple as editing the Hosts file. Here is the issue I received when I clicked Home link on Dynamics AX 2012 rich client.



In order to resolve this issue, I edited the C:\Windows\System32\drivers\etc\Hosts file in a text editor and added the following two lines

127.0.0.1       dynamicsax.contoso.com
127.0.0.1       sharepoint

Here is how it looks like


Couple of users noted that the fix above alone did not make their Enterprise Portal work. On top of the fix above you may need to change the binding in IIS manager.

1- Open IIS manager and navigate to Sites\DynamicsAX.
2- Go to Actions->Bindings.
3- Change the ip address to 127.0.0.1.

This may take a few minutes the first time to start.
Thanks to Alok Joshi for this insight which he quoted it from Arttu Vuorinen.

Tuesday, January 8, 2013

Start Debugging in AX 2012 - for non-developers

In order to start debugging the Dynamics AX code first you need to enable debugging for the current user. You can enable the debugging for the current user by setting the Debug mode to "When Breakpoint" under "File/Tools/Options/Development/Debug" tab.


If you don't know where to start debugging an issue that throws an Infolog message, you can put a breakpoint to Info:add class.This will make the process stop for debugging for every infolog message.


Then in the debugger, when the process stops you can traverse the callstack in order to find the underlying issue.



Where is the user information kept in Dynamics AX?

The name of the table that keeps the user information in Dynamics AX is "UserInfo". But you cannot access this table under "AOT/Data Dictionary/Tables" like any other database tables in AX.

You can reach this table and browse it under "AOT/System Documentation/Tables". 


In order to browse the table right-click and use "Table Browser":

















How to debug the X++ code that is compiled to CIL?

One of the neat features of Dynamics AX 2012 is that it provides a way to compile X++ code to IL which then can be consumed by Microsoft .NET framework and  in return enhances the performance. But this brings some complexity to the issue identification and debugging efforts. In Dynamics AX 2012 client, if you receive an Infolog message which is not very meaningful and the double click on that message does not take you to any code, it is very likely that the code that you are running during your process is compiled into IL using this new feature. One way to get around this issue and to debug the System Operations Framework is to make the following change on runServiceOperation function of SysOperationRPCFrameworkService  class:


public static container runServiceOperation(ClassId controllerClassId, container packedController)
{
    // Use the runas API to transition to a CLR session
    new XppILExecutePermission().assert();
    
    // Disable this piece of Code - AK
    /*return SysDictClass::invokeStaticMethodIL(classStr(SysOperationServiceController),
                                        staticMethodStr(SysOperationServiceController, runServiceOperation),
                                        [controllerClassId, packedController]);*/
  
    // instead make this call - AK
    return SysOperationServiceController::runServiceOperation([controllerClassId, packedController]); 
}

After making this change, you will be able to double click the Infolog message and put a breakpoint and trace the call stack to find the underlying issue that causes the Infolog message.

X++ Development Notes for Non-Developers 01 - Empty Date Values

If you need to set a date field to an empty date or if you need to check whether a date field is empty or not, you can use Global::datenull() function which basically returns the date "01/01/1900". Here is a simple example

if (mydatefield == datenull())

// You don't need to specify Global class name to access Global class functions


Initial Step for Tracking an Unknown Enterprise Portal Issue

If you are having an issue on Enterprise Portal for Dynamics AX 2012 with no warning/error messages and wonder how you can start tracking this issue, here is the place that you can find the log files for SharePoint.

C:\Program Files\Common Files\Microsoft Shared\web server extensions\$VERSION\LOGS 

In addition, you can also check the event logs on the SharePoint Server which you can locate at

Server manager | Diagnostic | Event viewer. 

Right Click on Application and do Save All Events As 

to save the log file.