Is there a solution for this in CloudKit JS? I have not been able to write a successful query to even get the ID of a Record.
The question in this link was here before, it is related if you'd like to take a look.
Is there a solution for this in CloudKit JS? I have not been able to write a successful query to even get the ID of a Record.
The question in this link was here before, it is related if you'd like to take a look.
In CloudKit, the
recordName
is a Record's unique identifier. You can specify one yourself when creating a record or not specify it and let the server create a UUID for you. When fetching one or more records, you can access it via therecordName
property.You could have an auto-incrementing id if you specified the recordName yourself, but that would be quite cumbersome to manage for a system with distributed clients. It's likely that you'll instead want to allow the server to create the recordName UUID for you. You could then query the records and sort by creation date if you wanted to know the order in which they were created.