ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 3 replies, has 2 voices, and was last updated by  cardiac 1 year, 8 months ago.

  • Creator
    Topic
  • #15223

    cardiac
    Participant

    Hi all,

    I tried to use the fields of a related entity as title for autocomplete.
    I want to see the “customerproject” id and the lead.”firstName” and lead.”lastName”

    form.yml

    search.yml

    But I can only see name or id field. firstName, lastName, leadName or whatever I tried to do doesn’t work.

    Thank you for your time

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #15225

    Sergey
    Oro Core

    Hi, @cardiac

    Please check your entities and config first.

    many to one relation from your entity side should have singular name – lead or should be one to many.

    And you can use property path for field configuration, like

    #15802

    cardiac
    Participant

    Thanks. The relation was wrong. And the property path is a nice solution.

    Here’s the code for the community:

    CustomerProject Entity:

    #15816

    cardiac
    Participant

    Update:
    Got an error when creating a CustomerProject:

    The field “firstName” specified as “one-to-many” relation for entity “app_customerproject” is not a collection.

    Solution:
    Firstname and lastname field not needed in search.yml

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.