Is there a way to set the ID of a DB object through cloud code? Here is my use case:
Two separate apps. Two separate DB objects with similar but not the same schema. I.E user object but with a few fields that are different. I am wanting one app to pull data from the other DB and create/update an item using the data from the pull. This is working fine by calling the API in cloud code. I want to be able to set the created object’s id field.
I tried doing this in Cloud Code via this command object.create({ id: *pulled_object*.id })
. This doesn’t seem to work via cloud code. It still autogenerates the id. However, I can do this if I pass it as data via an API request.
Is this possible in cloud code? I want the same ID so I can compare the data by ID.