Task recorder is a recording tool that ships with AX 2012. It lets you record steps within AX. Along with the recordings it takes, it can generate Word or Excel files listing out all of the steps taken during the recording. The recordings and documentation work really well for training and repeatable testing purposes.
A downside of task recorder is you have to enter some settings for it in AX before doing your recordings and the setup data is saved in the AX database. This becomes an issue if you do your recordings in a test environment and then you refresh the test database by restoring a backup of your production database into the test environment. When you do the restore, you lose the setup information stored for task recorder. This article discusses a way for you to recreate the majority of the setup information, specifically the set up of your framework so you don’t have to manually recreate it.
If you need information on how to use task recorder check out the whitepaper located here.
1. To open task recorder in AX go directly above Favorites in the navigation pane to File > Tools > Task recorder.
2. Before you can do any recordings you need to create framework hierarchy levels. To set them up click on the Settings tab and click the Hierarchy levels button. In the form that opens, create framework hierarchy levels and give them a Recording mode = Advanced.
3. In the AOT Microsoft has included an Excel template that you need to fill out. In the AOT go to Shared projects and find the project called SysTaskRecorderPlus and open that project up. In there you should find a Resources node with an entry called SysTaskRecorderProcessImportTemplate.
4. On that resource, SysTaskRecorderProcessImportTemplate, right-click and choose Open. It will bring up a Preview form, on that form click Export and save the file to a location of your preference.
5. Now go out to wherever you saved the file and you will see an Excel spreadsheet has been saved at the location you specified. In the spreadsheet enter your hierarchy information.
For example, in task recorder my framework and hierarchy information looks like this:
In the Excel spreadsheet I entered my hierarchy information like this:
6. Once your hierarchy information has been saved into the Excel spreadsheet you are ready to begin testing your ability to import of this information. In the task recorder form, click on the Settings tab and click Import hierarchy.
7. A form will open asking you for the location of the Excel spreadsheet. Enter the path and click Validate. If you are missing entries in the spreadsheet the validate button will let you know so you have a chance to clean up any pieces that might not be correct.
8. Once you are ready to go and the Validate button isn’t returning any messages close the Import hierarchy form. You don’t want to run this yet in your test because we need to delete out the hierarchy you have.
9. Now in the task recorder form select your nodes and delete them by clicking the Delete node button.
10. Once the nodes are deleted, click on the Settings tab and click the Import hierarchy button, path out to your spreadsheet and click the Import hierarchy button to import your hierarchy data from the spreadsheet.
11. Verify what was imported matched what you had previously. If it does, you now have a spreadsheet that can be used as your import template each time you need to restore data.