+ Start a Discussion


Im new to .Net...

Isn't it possible to cast the QueryResult to an SObject where I can access the properties with dot notation instead of using case?

What  I did
apex.QueryResult all = binding.query("Select a.Id, a.Name from Account");
foreach (var item in all.records)
  foreach (XmlElement col in item.Any){
     switch (col.LocalName.ToLower())
         case "id":
            //to something

 Is that the only possibility? I would like to have something like:
String accountName = item.Name;

Thanks for your help.

You can do that if you use the enterprise WSDL instead of the partner WSDL.