If you want to get rid of the annoying login prompt when starting AX if you have EP installed. Follow this two step solution:
- Start Server Manager. Go to Local Server and IE Enhanced Security Configuration. Turn it off. You might have to log out and in again for this to take effect.
- Start an AX client. Go to SysAdmin\Setup\EP\Web sites. Copy the address at the bottom of the form. Open it in a browser. There is a button for it in the right part of the form. To the top left, click Site Actions and Site Access. Add your user and give it access to the site.
Now you can open AX without getting harassed by a login prompt each time.
If you try to start the AOS service and get Error 5: Access is denied you should check that the service account is Local Admin. We have had installations the work fine but after a modelstore update run into problems and it was because this. Why the service was allowed to start before the update is unclear but should be seen more as pure luck. The account should be part of Local Admin.
If you have a catch where you want to do nothing you will get a warning: “Empty compound statement”.
Some just leave it be. Others put in all kinds of code just to make the warning go away. Neither of these are a good solution.
There is a method in the global class called ExceptionTextFallThrough. It will let the text in the exception fall through and eventually be caught by the Infolog.
Working with AX 2012 you soon learn that CIL code can cause problems and searching the web you find out you might need to clear the CIL folder. The problem is there are a few different advises out there and most of them miss out on a vital step.
Here is how to do it the right way, clearing the CIL cache and regenerating it:
- Make sure you have no compilation errors in code
- Stop ALL AOS services for the AX instance
- In SQL Server Management Studio truncate the SYSXPPASSEMBLY table in the modelstore database
- Go to the XppIL folder for the instance …\Server\INSTANCE NAME\bin\XppIL for each AOS services
- Make a backup of the folder content, in case you want to play it safe
- Delete all content of the folder for each AOS services
- Start ONE AOS service, preferably what is considered to be the primary AOS, for the AX instance
- Open AX and start Generate Full CIL, from menu Build\Generate full CIL or corresponding button in ribbon, in workspace
- When it is done, you can start any other AOS services, one at a time
There are two types of caches for a user. Values and settings are saved in SysLastValue table. Code and labels are saved in auc and kti files in the %USERPROFILE%\AppData\Local\ folder which can be located on each server or in a server share if a server farm is used with roaming.
If you want to make sure there is no old cache disturbing when code is upgraded you can clear these two. If the users have made a lot of changes in forms they might get a bit upset losing it all but sometimes it really is a must.
By using PowerShell you could script to clear all of this. While shipping code and services are down, send a SQL command Delete from SysLastValue and then for each user, iterating the user table in AX, go to the %USERPROFILE%\AppData\Local\ folder, or just C:\Users\CurrentUser\AppData\Local folder if you find it easier and know that is the path used, and delete all ax*.auc and ax*.kti files.
Another short post about this http://axninja.blogspot.se/2014/04/ax-user-caches.html
A post showing how to batch the clearing of file caches by using bat files http://blog.bhsolutions.com/index.php/2014/05/dynamics-ax-2012-spring-cleaning-app-data/. However this one, as it is written in the post, just works per user so each user would have to have the bat scheduled.
How do you find the way back to which project journal lines upon which a project invoice is based?
ProjInvoiceTable only holds the Invoice Id while ProjInvoiceJour table holds the Invoice id, Proposal id as well as Project Id. These fields can also be found in ProjProposalJour table, so you may just as well use that, unless there is some specific value which you need from there. If you want to check if the proposal has been invoiced, you can check the LineProperty value.
From there on you either need to know which type of project journal that was used to post the cost or check them all. The tables used are ProjProposalCost, ProjProposalEmpl, ProjProposalItem, ProjProposalOnAcc, ProjProposalRevenue and they all have a corresponding Detail table.
The last step is the ProjJournalTrans table. For all the other tables you can find the relations on the tables to see which fields are used to link records. This one can not be found on the Relations node. The field TransId holds the relation between the ProjProposal… tables and the ProjJournalTrans table.