Here’s a little scripting snippet for how to retrieve all the information about an entity, without knowing or hard-coding the space name, database name or field names:
const fibery = context.getService('fibery');
// get entire schema
const schema = await fibery.getSchema();
// get specific database (type) name
const typeName = args.currentEntities[0].type;
// filter the schema for the specific type and get all field names
const fields = schema['typeObjects'].filter((obj) => obj.name == typeName)[0]['fieldObjects'].map((field) => field.name);
// get all entities with all fields
const entitiesWithAllFields = await fibery.getEntitiesByIds(typeName, args.currentEntities.map((entity) => entity.id), fields);
// send result to the browser console
console.log(entitiesWithAllFields);
Yeah, it seems that it won’t work if the Whiteboards or Documents field is enabled (whiteboards and documents are technically views, so you can’t query them like you can for fields and relations).
To avoid the issue, I suggest using replacing this