Dear all,
 
I am trying to generate an overview of the configuration keys and their parents in the system. I am targetting at displaying which of the keys are enable and which are not.
I want to have the output exported to a fle or else printed.
 
I have 4 main questions:
 
1.Can someone explain me how I can export the output or indicate where I can find an example.
 
2. How can I print it?
 
3. The most difficult question I have is related to the Job I created. I have defined an Object parConfigurationKey based on the DictConfigurationKey. See below in the Job.
When I compile the job there are no errors. When I run the Job I get the error :
Error.
Error executing code: DictConfigurationKey object not initalized.
 
Stack trace:
\Classes\DictConfigurationKey\name
\Jobs\..... line 39
 
What I am trying to accomplish is printing the name of the parentConfigurationKey for each ConfigurationKey.
 
4. I also need to built in somekind of a loop that prints the parents until it arrives at parent id 0. How can I does so, considering the above mentioned problems.
 
Regards,
Danny
 
 
 
static void QryConfigurationKeys(Args _args)
{
Dictionary dictionary = new Dictionary();
ConfigurationKeySet configurationKeySet = new ConfigurationKeySet();
DictConfigurationKey dictConfigurationKey;
DictConfigurationKey parConfigurationKey;

int cntCfgKey, cntCfgKeySet;

print "number of configuration keys: "+int2str(dictionary.configurationKeyCnt());

for (cntCfgKey=1; cntCfgKey<= dictionary.configurationKeyCnt();cntCfgKey++)
{
dictConfigurationKey = new DictConfigurationKey(dictionary.configurationKeyCnt2Id(cntCfgKey));

if (dictConfigurationKey.name() like "*BOM*")
{
print Int2Str(dictionary.configurationKeyCnt2Id(cntCfgKey))
+ " "
+ dictConfigurationKey.name()
+ " "
+ Enum2Str(dictConfigurationKey.enabled())
+ " "
+ dictConfigurationKey.label()
+ " "
+ Int2Str(dictConfigurationKey.parentConfigurationKeyId());

/*
parConfigurationKey = new DictConfigurationKey(dictConfigurationKey.parentConfigurationKeyId());

print parConfigurationKey.name();
*/

}
}
}

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.


Yahoo! Groups Links

Reply via email to