You need to sign in to do that
Don't have an account?
WSC: Can list of field names be returned from QueryResult?
I am using the Force.com WSC connector for Java.
Is it possible to return a list of fields or field names from a QueryResult's SObject? I only see getField (which requires that I hardcode the name of the field of interest). I am looking for something like getFields which returns an array of field objects or field names, etc..
I could go through and parse the select field statement to determine these names based on the query the user enters. I just want to check here to see if there's a way to identify the list of fields requested from the QueryResult object. Any feedback is appreciated.
thanks
Thx!
All Answers
In WSC, the SObject class extends XmlObject, which has a method called getChildren() that should do what you want.
Thx!