Site icon DAXRunBase

AX License Configuration details

In older versions of AX we could see additional details under System administration > Setup > Licensing > License configuration that has been missing from the more recent versions. Here is an update done in version 2012 R3 to have better AX License Configuration details by showing the configuration key name in the AOT, the application layer and the model:

The heart of the code is as per below to populate the 3 form controls, called in the Tree.selectionChanged() method:

public void WIK_setElement()
{
    int                     idx             = Tree.getSelection();
    FormTreeItem            node            = Tree.getItem(idx);
    boolean                 isValidLicense  = node && !node.overlayImage();
    ConfigurationKeyName    configKeyName;

    SysModelElement     elementNode;
    SysModelElementData elementData;
    SysModelManifest    model;
    SysModelLayer       layer;

    if (isValidLicense)
    {
        configKeyName = configurationkeyId2Name(Tree.getItem(idx).data());

        select firstOnly Name from model
            join elementNode
                where  elementNode.Name         == configKeyName
                    && elementNode.ElementType  == UtilElementType::ConfigurationKey
            join elementData
                where  elementData.ModelElement == elementNode.RecId
                    && model.Model              == elementData.ModelId
            join Layer from layer
                where layer.RecId   == elementData.Layer;
    }

    WIK_LicenseConfig.text(isValidLicense ? configKeyName : '');
    WIK_LicenseLayer.text(isValidLicense ? enum2Symbol(enumNum(UtilEntryLevel), layer.Layer) : '');
    WIK_LicenseModel.text(isValidLicense ? model.Name : '');
}

Here is the XPO of the changes:

Forms_SysConfiguration.zip

Exit mobile version