• irwinhurst
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
i am trying to return a Custom field using a query.  The Query works just fine but how to I read the results?  I found an exmaple online like this
sforce.sObject con = qr.records[i]; string fName = con.Any[0].InnerText; string lName = con.Any[1].InnerText; if (fName == null) Console.WriteLine("Contact " + (i + 1) + ": " + lName); else Console.WriteLine("Contact " + (i + 1) + ": " + fName + " " + lName); }


The problem with this code is that the sObject does not have a proeprty called Any[].  It doesn't exist and fails to compile.

I am using basicSample_cs.zip to try this.  It is referencing
C:\dev\sforce\API 8.0\VS\samples\enterprise.wsdl.

Any ideas?

thanks.
i am trying to return a Custom field using a query.  The Query works just fine but how to I read the results?  I found an exmaple online like this
sforce.sObject con = qr.records[i]; string fName = con.Any[0].InnerText; string lName = con.Any[1].InnerText; if (fName == null) Console.WriteLine("Contact " + (i + 1) + ": " + lName); else Console.WriteLine("Contact " + (i + 1) + ": " + fName + " " + lName); }


The problem with this code is that the sObject does not have a proeprty called Any[].  It doesn't exist and fails to compile.

I am using basicSample_cs.zip to try this.  It is referencing
C:\dev\sforce\API 8.0\VS\samples\enterprise.wsdl.

Any ideas?

thanks.