Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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