We’re aware of an issue causing slower load times on the Dropbox Community forum. It should be resolved soon. Thanks for your patience! 

Forum Discussion

Joe C.6's avatar
Joe C.6
New member | Level 1
11 years ago

How do I set the record ID for a DBRecord when it's created on iOS?

I need to set the ID of a DBRecord (Dropbox record) when I create it, but I don't see in the documentation where it explains how. It just says, "Each record has a string ID. An ID can be provided when a record is created, or one will be automatically generated and assigned if none is provided. Once a record is created, the ID cannot be changed."

I've tried the following...

NSString *id = @"1";
NSDictionary *record = @{@"recordId" : id, @"otherField" : @"whatever"};
[tbl insert:record];
[self.datastore sync:nil]; 

...but I'm completely guessing at the name of the id field and that code just creates an additional property called "recordId", rather than setting the actual record id.

How do I set the id for a DBRecord when I create it? Thanks in advance for your wisdom!

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!