Announcement

Collapse
No announcement yet.

Filtering a related entity selector based on another related entity (parent)

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

  • Filtering a related entity selector based on another related entity (parent)

    Hello. I have an entity, let's call it 'Event' with two foreign keys, let's call them country and city. After I select a country entity, I'd like the city entity selection popup to be filtered by country. Also, if possible, when adding a new city in the same popup, I'd like country to be preselected. Do you think this is possible?

    This is because the user first knows the country and later finds out the city and edits the Event.

    I'm sorry if I am asking the same question twice, I am fairly sure I've either asked this before or done this before, but I can't find the code or the answer.

    Thanks!

  • #2
    Hello
    Check entity Opportunity. The similar is implemented for account and contacts field. Start to dig from
    application/Espo/Modules/Crm/Resources/metadata/entityDefs/Opportunity.json > fields > contacts > view

    Comment


    • #3
      Thank you, the code in client/modules/crm/src/views/opportunity/fields/contacts.js worked like a charm!

      Comment

      Working...
      X