The source record (BaseEntity or plain object)
The name of the field to extract
The field value, or undefined if not found
// Works with BaseEntity
const entity = await md.GetEntityObject<TaskEntity>('Tasks');
const name = getFieldValue(entity, 'Name'); // Uses entity.Get('Name')
// Works with plain objects
const obj = { name: 'My Task', status: 'Open' };
const name = getFieldValue(obj, 'name'); // Uses obj['name']
Extracts a field value from a record, supporting both BaseEntity and plain objects.
For BaseEntity objects (detected by presence of
.Get()method), uses the.Get()method. For plain JavaScript objects, uses standard bracket notation.