Export (0) Print
Expand All

Creating Checklists [AX 2012]

Updated: May 23, 2011

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.

  1. Create a new class that inherits from the SysCheckList class. For an example of methods that can be overridden, see the SysCheckList_Setup class.

  2. Create a new empty interface. The interface is used by items that belong to the checklist.

  3. Add the classId to the SysCheckList::checkLists static method.

  4. Create the necessary checklist items and add them to your checklist.

  1. Create a new class that inherits from SysCheckListItem class.

  2. Override the following methods:

  3. Set the security key for the menu items to limit access to certain users based on user permissions, by using the Menu.securityKey method.

  4. Add a dependency for a menu item by using the SysCheckListItem.addDependency method.

  5. Run the following code when the checklist tasks are completed.

    SysCheckList::finished(classnum(SysCheckListItem_MyNewItem))
    
  6. Add the ID for the class you created in step 1 to the ::checkListItems static method.

  7. 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)} ); 

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. get your copy at the MS Press Store

Community Additions

ADD
Show:
© 2014 Microsoft