Genesys CTI User Forum > Genesys-related Development

Trying to read from CME >Application>options in.Net

(1/2) > >>

Vegeta:
Hi Genesys Wizards,

I am trying to read the values from CME servers Application -> Properties -> Options (via .Net PSDK API)

I am trying to read it manually like Configuration>environment>applications>Desktop ( Right click on listed application Name>properties>options).

if its the cfgapplication object , then I am looking at a method called getoptions() to probably achieve the same in JAVA
URL :http://www.genesyslab.info/repository/PSDK/8.0-Java_API_Reference/com/genesyslab/platform/applicationblocks/com/objects/CfgApplication.html#getOptions()

But I don't see a similar method listed in .Net PSDK chm file :(

So I tried to do it like the below in .net as a first step I was trying to read the application Name but no luck. (then I would want to read the options )

Could you please advice if am missing anything or is there a equivalent method like getoptions in .net?

[code]

var CfgapplicQuery = new CfgApplicationQuery(service) { Name = "MY APPLIC NAME"};
var CfgApplication_Query_Values = CfgapplicQuery.Execute();
foreach (CfgApplication values in CfgApplication_Query_values)
{
MessageBox.Show(Values.Name); // I would expect it to display the Applic Name passed in query while it isn't!!
}
[/code]

Kubig:
You have to work with CfgApplication object to allow using method getOptions(). Did you try to retype the retrieved object to the CfgApplication?

PeteHoyle:



That code works for me..

In .Net to get the options use .Options


                [code]var CfgapplicQuery = new CfgApplicationQuery(confService) { Name = "Stat_Server" };
                var CfgApplication_Query_Values = CfgapplicQuery.Execute();
                foreach (CfgApplication values in CfgApplication_Query_Values)
                {
                    Console.WriteLine(values.Name);
                    var kvLog = values.Options["Log"];
                    if (kvLog != null)
                    {
                    }
                }[/code]

daniel_san:
Another way to do the same...

CfgApplication app = configService.MyApplication;

And then, app.UserProperties (annex) , appOptions (options)

Regards!

Vegeta:
[quote author=PeteHoyle link=topic=9681.msg43811#msg43811 date=1466664655]



That code works for me..

In .Net to get the options use .Options


                [code]var CfgapplicQuery = new CfgApplicationQuery(confService) { Name = "Stat_Server" };
                var CfgApplication_Query_Values = CfgapplicQuery.Execute();
                foreach (CfgApplication values in CfgApplication_Query_Values)
                {
                    Console.WriteLine(values.Name);
                    var kvLog = values.Options["Log"];
                    if (kvLog != null)
                    {
                    }
                }[/code]
[/quote]

Thanks PeteHoyle :) with your code I got some idea how to do this .. :)

Navigation

[0] Message Index

[#] Next page

Go to full version