function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gshuflingshuflin 

Need some help troubleshooting failure to update org's database with iOS toolkit

I'm making use of the Salesforce iOS toolkit for a custom app for my organization. I'm basically using the ZKSObjects that that framework provides to store the state of my organization's records on the iPad, and then, when the user hits an update button, runs:

 

 

[[ZKServerSwitchboardswitchboard] update:[NSArrayarrayWithObject:checklistZKSObject] target:selfselector:@selector(handleUserSave:error:context:) context:nil];

 

where checklistZKSObject is a reference to that ZKSObject. The selector is called on self, and that selector doesn't see any NSError in the update. Nonetheless, the changes I make to the ZKSObject aren't getting reflected in salesforce. Since there's no error getting returned by the selector, I'm not sure what I should be checking next to see where the problem is.

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

The first parameter in the callback method is an NSArray, each array item is a ZKSaveResult, this object will contain per row information about the update results (success, failure code/messages etc) see https://github.com/developerforce/Force.com-Toolkit-for-iOS/blob/master/ZKSforce/ZKSaveResult.h

All Answers

SuperfellSuperfell

One of the things you should get in the callback is the SaveResult objects, that will include details about the success/failure of individual records in the update call.

SuperfellSuperfell

The first parameter in the callback method is an NSArray, each array item is a ZKSaveResult, this object will contain per row information about the update results (success, failure code/messages etc) see https://github.com/developerforce/Force.com-Toolkit-for-iOS/blob/master/ZKSforce/ZKSaveResult.h

This was selected as the best answer