twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Settings/Objects/Object Detail - Fields section - Implement "Set as record text" menu item for Custom objects

Open thaisguigon opened this issue 1 year ago • 3 comments

thaisguigon avatar Jan 08 '24 12:01 thaisguigon

  • prevent user from disabling a field that is set as record identifier (also prevent in backend)

charlesBochet avatar Jan 08 '24 13:01 charlesBochet

@Weiko can provide more context on how to handle the backend

charlesBochet avatar Jan 08 '24 13:01 charlesBochet

@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');
    }

Weiko avatar Jan 08 '24 17:01 Weiko