You need to sign in to do that
Don't have an account?
edwinfarrar
Accessing a queryresult record's data elements
I am using C#.NET 2.0. I need to access the data within a QueryResult record without casting the sObject to a SFDC Object (like User) class. I need to roll through the individual data elements of a given record in a systematic manner independent of what the underlying SFDC Object (User) actually is. I will know the names of the individual data elements because of the query's column listing.
For example, something like...
DataRow dr;
dr = dt.NewRow();
sObject drQR = qr.records[x];
dr["ID"] = drQR["ID"];
dr = dt.NewRow();
sObject drQR = qr.records[x];
dr["ID"] = drQR["ID"];
Edwin Farrar
Superfell
You can use reflection, or switch to using the partner WSDL, makes these kinds of things pretty trivial.
edwinfarrar
Thanks, the partner wsdl is exactly what I needed.
Acronym
Take a look at the partner samples for .NET.