You need to sign in to do that
Don't have an account?
danny3107
zksforce : get query value
Hi all,
I am new to Objective C and iPhone dev, so sorry in advance if my question is stupid.
I am trying to get the value of my query.
My Query:
ZKQueryResult *qr = [sforce query:@"select AccountID from Contact where email='xxx@xxx.com'"];
I want to display my result:
NSLog(@"query results:%@",[qr records]);
And I get :
query results:(
"Contact (null) fields={\n AccountId = 001A000000TqfLnIAJ;\n} toNull={(\n)}"
Is there a way to get automaticly : 01A000000TqfLnIAJ ?
if not, how can I do? NSRange?
Thanks in Advance,
[qr records] returns an NSArray of ZKSObjects, ZKSObject has getters that take field names, so you'd want to do something like
for (ZKSObject *o in [qr records]) {
NSLog(@"%@", [o fieldValue:@"AccountId"]);
}
All Answers
[qr records] returns an NSArray of ZKSObjects, ZKSObject has getters that take field names, so you'd want to do something like
for (ZKSObject *o in [qr records]) {
NSLog(@"%@", [o fieldValue:@"AccountId"]);
}
Thanks a lot !