Created
December 22, 2011 12:25
-
-
Save palaniraja/1510135 to your computer and use it in GitHub Desktop.
Get record(s)/obj(s) from salesforce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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