Creating Checklists
Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Checklists can be used during setup and upgrade. The checklist concept provides a tool for adding items that must be part of a specific setup procedure.
Creating a New Checklist
Create a new class that inherits from the SysCheckList class. For an example of methods that can be overridden, see the SysCheckList_Setup class.
Create a new empty interface. The interface is used by items that belong to the checklist.
Add the classId to the SysCheckList::checkLists static method.
Create the necessary checklist items and add them to your checklist.
Adding Items to a Checklist
Create a new class that inherits from SysCheckListItem class.
Override the following methods:
Set the security key for the menu items to limit access to certain users based on user permissions, by using the Menu.securityKey method.
Add a dependency for a menu item by using the SysCheckListItem.addDependency method.
Run the following code when the checklist tasks are completed.
SysCheckList::finished(classnum(SysCheckListItem_MyNewItem))
Add the ID for the class you created in step 1 to the ::checkListItems static method.
If a menu item requires restarting the system, call SysCheckList.needReStart in the SysCheckListItem.setStatus method as shown in the following example.
if (status == SysCheckListStatus::finished && !this.find())
{
this.save();
SysCheckList.needRestart(true);
}
The following code shows a call to the SysCheckListItem.placeAfter method that sets the sequence in the list and a call to the SysCheckListItem.indeterminate method that indicates that a menu item can be skipped. When a user clicks the item, the status changes to finished.
The placeAfter method depends on the SysCheckList.sortWithStatusPreference method.
super();
this.indeterminate(true); // You can skip this item
this.placeAfter(classnum(SysCheckListItem_Synchronize));
// Can only run after sync
this.addDependency(classnum(SysCheckListItem_Synchronize));
// Can only run after compile or licensecode
this.addDependency( [classnum(SysCheckListItem_Compile), classnum(SysCheckListItem_LicenseCode)} );
See also
Upgrading to a New Version of Microsoft Dynamics AX
Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.