Skip to content

Instantly share code, notes, and snippets.

@palaniraja
Created December 22, 2011 12:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palaniraja/1510135 to your computer and use it in GitHub Desktop.
Save palaniraja/1510135 to your computer and use it in GitHub Desktop.
Get record(s)/obj(s) from salesforce
NSString *getCasesSQL = [NSString stringWithFormat:@"SELECT id, Site__r.Name FROM Case WHERE id = '%@'", @"a0FM0000000XrKcMAK"];
[[FDCServerSwitchboard switchboard] getCasesSQL target:self selector:@selector(getCasesSiteInfoResult:error:context:) context:nil];
/*asynchronously called when the objects are fetched from Salesforce*/
- (void)getCasesSiteInfoResult:(ZKQueryResult *)result error:(NSError *)error context:(id)context{
if (result && !error){
NSMutableArray *records = [NSMutableArray arrayWithArray:[result records]];
//records are of type ZKSObject
}
else if (error){
NSLog(@"Error: %@", [error description]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment