I have an entity in one Space I want to move to another, would use the Convert to feature but some of the field names may not match.
In its simplest form I want to copy a few simple fields (Name and Salary) from an entity from Space A > Db X to Space B > Db Y.
The part I’m not sure about is how to specify fibery.createEntity
to do so in Space B > Db Y.
Here is what I have so far:
const fibery = context.getService('fibery');
for (const entity of args.currentEntities) {
const name = entity['Name'];
const salary = entity['Salary'];
await fibery.createEntity(entity.type, entity.id, {
// ...
});
}