Its always a great opportunity to interact with other AX developers and have the opportunity to learn from each other. A few weeks ago I published a blog post on searching the AX AOT in code for objects with specific properties, after the post went out I got a comment on the post of a much easier way to search the AOT from the frontend, that for some reason I have never really noticed before. So here is a quick way to do an advanced search of the AOT using a real situation I encountered this morning.
Example: Find all privileges in the AOT that have a specific menuitem as an entry point. e.g. “PurchFormLetter_PackingSlip”
1. Open an AOT and select the section of the AOT that you wish to search. Obviously the narrower the search the quicker it will be. I selected Security->Privileges.
2. Right click on the object. Click Find
3. Select “All Nodes” in the search dropdown
4. Select properties tab.
5. Right click on any field in the “Property” Column, Click filter by field.
6. Enter the name of the property you wish to search on. In my case I’m looking for all entry points that points that have the ObjectName set to PurchFormLetter_PackingSlip, so i enter “ObjectName”
7. Click Ok.
8. Click the “Selected” checkbox
9. Enter the value you want to search for under “Range” e.g. “PurchFormLetter_PackingSlip”
10. Repeat steps 5-9 if you want to search for multiple properties.
11. Click Find now
12. You will now have a list of all the subobjects of whatever you selected in step 1 containing a specific property with a specific value.
Note 1: You can also do some pretty neat searches using both the date and advanced tabs on this form so be sure to check them out too.
I hope this helps somebody who like me has just overlooked this for years.
Thanks Martin for the tip!
Disclaimer: For my specific example it may have been easier to use either the Security development tool or right click on the menu-item in AX -> Add-ins -> Security Tools -> View related security objects. But I needed an example for this post 🙂
When one is exposed to a new AX environment, one of the first things to do is check exactly what version of AX kernel is running. Obviously the easiest way to do this is to open the “about” box in AX and note the build number and compare it with the common build numbers on a site such as Axaptapedia or MSDN
However on occasion when a kernel hotfix has been installed you will not find your build numbers on these pages. Searching for the build number on google, customersource or partner source also doesnt reveal anything. So here is the slightly round-about way I have found to find out what kernel hotfix has been installed. If you have an easier way, please let me know!
1. Take note of your kernel number in the about box of Dynamics AX
2. Confirm that the build number is not a major CU release by reviewing the sites above
3. Open up programs and features on the AOS, select “View installed updates”
4. Locate the section on “Microsoft Dynamics AX 2012 Object Server”. Take not of the KB article numbers listed
5. Logon to Microsoft customer or partnersource.
6. Open any existing KB article e.g. https://mbs2.microsoft.com/Knowledgebase/KBDisplay.aspx?scid=kb;EN-US;2998197
7. Replace the KB number in the URL with the KB number noted in step 4. E.G:
This example reveals that we have a hotfix to resolve “SysGlobalObjectCache is not invalidated in multi Application Object Server (AOS) environment for CIL code”
I hope this helps anybody who has ever struggled to find out what kernal hotfixes are installed.
I also hope there is an easier way!
I’ve recently moved into an environment with multiple load balanced AOSs that need to be controlled during code deployment and maintenance. If one needs to stop and start these services include either to logging into each machine individually or using the Windows services control panel to connect to the indivual machines to shutdown each AOS service.
Both of these options unfortunately are rather tedious and time consuming especially if you have numerous services to control and need to do it quickly. A simple way to do this is to batch/script the process using command line instructions to control the remote services. You can use sc.exe application to do so. Here are some examples:
sc \\[SERVERNAME] stop [SERVICENAME] e.g. sc \\JH-Srv-01 stop AOS60$01
sc \\[SERVERNAME] start [SERVICENAME] e.g. sc \\JH-Srv-01 start AOS60$01
This will issue the commands but won’t necessarily wait around while the services are stopping or starting.
Adding multiple of these commands to a single .BAT file will make you environment management life much easier! You can also use it to control other services like SSRS etc…
Note 1: You will obviously need the necessary permissions on each of these servers to do these tasks.
Note 2: The service name is the name listed under the properties (right click on the service, click properties) of the service not the one in the list of services.