Еще вариант
X++:
XInfo xInfo = new XInfo();
Object obj;
SysDictLicenseCode SysDictLicenseCode;
DictConfigurationKey dictConfigKey;
ConfigurationKeyId getParentCKId(ConfigurationKeyId _keyid)
{
ConfigurationKeyId ret;
DictConfigurationKey key;
;
key = new DictConfigurationKey(_keyId);
if (key.parentConfigurationKeyId())
ret = getParentCKId(key.parentConfigurationKeyId());
else
ret = _keyId;
return ret;
}
;
obj = xInfo.rootNode();
obj = obj.AOTfindChild('Menu Items');
obj = obj.AOTfindChild('Display');
obj = obj.AOTfindChild('smmActivities');
if (obj.ConfigurationKey())
{
dictConfigKey = new DictConfigurationKey( getParentCKId(obj.ConfigurationKey()) );
if (dictConfigKey.licenseCode())
{
sysdictLicenseCode = new SysDictLicenseCode(dictConfigKey.licenseCode());
if (sysDictLicenseCode)
info(strfmt("%1", sysDictLicenseCode.isEntered()));
}
else
info("true");
}
else
info("true");