Getting all field values for an entity

Here’s a little scripting snippet for how to retrieve all the infromation 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) => == typeName)[0]['fieldObjects'].map((field) =>;
// get all entities with all fields
const entitiesWithAllFields = await fibery.getEntitiesByIds(typeName, =>, fields);
// send result to the browser console
1 Like