ConfigurationKeySet.cnt2Id Method [AX 2012]

Retrieves the ID of the nth configuration key.

public ConfigurationKeyId cnt2Id(int cnt)

Run On

Called

Parameters

cnt
Type: int
The index of the configuration key, which must be between 1 and the number of configuration keys.

Return Value

Type: ConfigurationKeyId Extended Data Type
The ID of the specified configuration key.

To find the number of configuration keys, use the cnt method. In general, the index and ID will differ, because not all the IDs are used.

ConfigurationKeySet configKeySet = new ConfigurationKeySet(); 
DictConfigurationKey dictConfigurationKey; 
int i; 
 
configKeySet.loadSystemSetup(); 
for (i=1; i<= configKeySet.cnt(); i++) 
{ 
    setPrefix('Disabled configurationkeys'); 
    if (!configKeySet.enabled( configKeySet.cnt2Id(i) )) 
    { 
        dictConfigurationKey =  
            new DictConfigurationKey(configKeySet.cnt2id(i)); 
        info (dictConfigurationKey.name()); 
    } 
}

Community Additions

ADD
Show: