twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Creating a new object - not able to pick relation typr

Open TheSuperAgent opened this issue 1 year ago • 7 comments

Im using v2.2.0 opensource version.

While creating a new object or adding a new field in existing object, im not able to see the relation type.

TheSuperAgent avatar Dec 28 '23 08:12 TheSuperAgent

Yes this is still behind feature flag IS_RELATION_FIELD_TYPE_ENABLED. Should be stable and feature flag will be removed very soon

FelixMalfait avatar Dec 31 '23 11:12 FelixMalfait

Hi I am having a problem with targeting the "Name"field in a relationship of 1 Opp TO-MANY Services because it won't let me bind my custom field "Opportunity/Service" to the Name of my custom object "Services", here is the ERROR:

duplicate key value violates unique constraint "IndexOnNameObjectMetadataIdAndWorkspaceIdUnique"

Can't we name the default "Name" field differently, like CustomServiceName, where CustomService is the name of the the New custom Service so to make them unique?

cocobeach avatar Jan 01 '24 12:01 cocobeach

cc @charlesBochet

FelixMalfait avatar Jan 02 '24 10:01 FelixMalfait

Did I say smth stoopid? 👀

cocobeach avatar Jan 02 '24 10:01 cocobeach

Haha no 😂 — just that @charlesBochet will be able to answer this better than I would

FelixMalfait avatar Jan 02 '24 10:01 FelixMalfait

Good point! So, right now we force all custom objects to have a "Name" field that you cannot remove from the UI. The reason why is that in many places in the app (relation picker, command menu, ...), we need to display what we call the "record identifier". For a company, it will be the Name. For a Person, it will be First Name + Last Name. For a custom object, it will be the Name for now.

Our plan is to let the user pick (for each object) what field should be considered as the record label identifier. The backend is ready but the Settings UI part has not been done yet.

You can check this figma: https://www.figma.com/file/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=11338%3A64083&mode=dev

I believe we also have tickets #2489. This will likely be tackled next week (happy to assist you if you want to help!)

charlesBochet avatar Jan 03 '24 21:01 charlesBochet

In the meantime you can try renaming this field manually in your own database

charlesBochet avatar Jan 03 '24 21:01 charlesBochet