ssossossosso

Forums

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

This topic contains 2 replies, has 3 voices, and was last updated by alendo alendo 2 years, 4 months ago.

  • Creator
    Topic
  • #7087

    changwuf31
    Participant

    I’ve created a person entity, and I want to create an oro_entity_create_or_select type that filter by name and also by gender. And maybe a few other parameters.
    Is this possible ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #7096
    Dmitry Khrysev
    Dmitry Khrysev
    Oro Core

    Hi.
    To achieve this next steps has to be performed:

    – Create Form type with parent set to ‘oro_entity_create_or_select_inline’. In defaults set autocomplete_alias and create_form_route. grid_name may be set to grid name which will be used in search dialog, if it does not set then grid_name from entity configuration will be used.

    – Add search.yml and define search rules for your Person entity there

    – Add service for autocomplete search handler. Tag it with oro_form.autocomplete.search_handler DI tag, set alias to your autocomplete_alias used in form type, set acl_resource.

    – Execute app/console oro:search:index for creating new indexes

    – (optional) For Person entity add form configuration scope and set form_type to your select type and grid_name that will be used by oro_entity_create_or_select_inline element as grid_name

    #7693
    alendo
    alendo
    Participant

    Hi Dmitry
    I followed the steps you suggested, but I have two problems: the autocomplete does not work for me, and even if the datagrid works, when I select a row in the datagrid nothing happens in the input field.
    I added also form_type and grid_name to my entity config.
    Do you have any suggestion?
    thanks
    Ale

    search.yml

    service.yml

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

You must be logged in to reply to this topic.