Announcement

Collapse
No announcement yet.

enumeration related to a link field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • enumeration related to a link field

    Hello !
    I would want to create an enumeration that is inside the link field once selected. Here is the picture of what I get (a varchar 'Rôle') and the one of what I would want taken from another entity.
    I checked the model of the entity where it is working and there is a enumeration field named entity1Role in entity2 and an enumeration field named entity2Role in entity1, entities 1 & 2 being related by a link.
    I tried to reproduce it between the two concerned entities (account and contact) but there is already a field named after that and it is a varchar field not enumeration... I cannot delete it (see third picture, no remove button) nor create another under this name.
    Can you please tell me if there is a way to fix this?

    Thank you in advance
    Last edited by chabaud_lelia; 07-15-2020, 07:01 AM.

  • #2
    Hi chabaud_lelia , I want to do be able to do this too but the skill level was too high for me (still is so I been holding back).

    Check out this thread, it might provide you some information.

    You can't just create it through the GUI method (I tried), need to do some coding which you seen to have the skill for. You manage to get a Enum field in there, now you just need to change it to a Varchar field somehow.

    Hopefully after you success you can share guide.
    Last edited by espcrm; 07-14-2020, 04:20 AM.

    Comment


    • chabaud_lelia
      chabaud_lelia commented
      Editing a comment
      the problem is actually how to change it because there is no options of modification or removing (so I can create another one under this name) for this field that was already existing. On my interface I can only modify or remove the fields I created...
      Sorry but what is it you advice me to check ? I don't see any link in your post

  • #3
    Hi chabaud_lelia,

    > I would want to create an enumeration that is inside the link field once selected. Here is the picture of what I get (a varchar 'Rôle') and the one of what I would want taken from another entity.

    You can't create such fields via UI. You need to do it on the code level.

    > I tried to reproduce it between the two concerned entities (account and contact) but there is already a field named after that and it is a varchar field not enumeration... I cannot delete it (see third picture, no remove button) nor create another under this name.

    This is the system link field that you cannot remove. Please chek how it works for the Contact Role enum type field in the Opportunity entity by investigating these files:
    1. /application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json
    2. /application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json
    3. /client/modules/crm/src/views/contact/fields/opportunity-role.js
    4. /client/modules/crm/src/views/opportunity/fields/contacts.js

    To investigate of how it works for the Account Role varchar type field in the Contact entity check these files:
    1. /application/Espo/Modules/Crm/Resources/metadata/entityDefs/Contact.json
    2. /application/Espo/Modules/Crm/Resources/metadata/entityDefs/Account.json
    3. /client/modules/crm/src/views/contact/fields/account-role.js
    Last edited by Maximus; 07-15-2020, 07:30 AM.

    Comment


    • chabaud_lelia
      chabaud_lelia commented
      Editing a comment
      thank you very much, gonna check it

  • #4
    Hi chabaud_lelia , odd. I must have not update the post properly. Here is the thread:

    I have create a few new relationship which link perfectly. The issue is that it just link and I can't put a note on that linkages. I have to either use the Stream comments, description, activity or anything else to note the relationship. Is there a way to create this type of field (see screenshot), where I can write

    Is it possible to create a custom template like the 'person-name' templates/js files? Or to customize the person-name template? E.g. to add first-letters and/or title? How would one do this and implement it in a custom resource? Thanks in advance for answers

    Comment

Working...
X