twenty
twenty copied to clipboard
Settings/Objects/Object Detail - Fields section - Implement "Set as record text" menu item for Custom objects
- prevent user from disabling a field that is set as record identifier (also prevent in backend)
@Weiko can provide more context on how to handle the backend
@Weiko can provide more context on how to handle the backend
@charlesBochet @thaisguigon you can check field-metadata.service.ts#updateOne method. We already fetch the object so you can add this in the method
if (
objectMetadata?.labelIdentifierFieldMetadataId ===
existingFieldMetadata.id &&
fieldMetadataInput.isActive === false
) {
throw new BadRequestException('Cannot deactivate label identifier field');
}