You can make many changes to a working copy at the same time. Your changes are not saved until you call save().
Creating new records
You can create new records by copying existing records or record templates.
const working_copy = await record.copy();
// make changes, then
const new_record = await working_copy.save();
// An ID is assigned on save. Temporary local-only offline numerical IDs are negative, while globally unique server-side IDs are positive.
While you can make a copy of any object you have access to, you may not be able to save it in the original cloud of the record. To overcome this, you can use:
This will use the same clouds and languages as in the cloud_source record for the copy. This will also remove the special "Type template" type from the copy, used to designate a record as a template for other records.
When using a template as a basis for your copy, you can also use the simpler copy_as_template_lite method to create your copy, but then set the clouds and languages yourself, if necessary.
A complete example that creates an activity in your user cloud and sets the actor as you, too.