If you get a dialog saying the object is already checked out by another user you can mark that line and a button emerges to take over the object. However we have experienced a few times that the first user to check it out claims to have lost changes, while the new user takes control of the object.
There is another way to do it. Go to the DB and locate the table SYSVERSIONCONTROLMORPHXLOCKTABLE. It holds all the locks and you can simply replace the userId in the CREATEDBY column for the object which you wish to take over the control for.
Want to Update, Insert and Delete when comparing one table against another in just one go. Merge is what you are looking for. It is explained in steps here: http://www.made2mentor.com/2013/05/writing-t-sql-merge-statements-the-right-way/
Find it hard to know what type of join to use when writing code in SQL? This is the best page I have seen explaining it: https://www.codeproject.com/kb/database/visual_sql_joins.aspx
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