OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – How do I? Questions How to create a owner search dropdownbox

This topic contains 7 replies, has 2 voices, and was last updated by  SHAD0WF4X 9 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #35696

    SHAD0WF4X
    Participant

    Hello,

    I created a new entity called projects. A project has an owner which a want to select from a fancy search dropdownbox. This search dropdownbox is also used for setting a owner to an account. I was looking in AccountBundle:Resources:views:Account:update.html.twig but I could not find any relation with the dropdown although it is used there. How can i use this fancy search dropdownbox?

    Thanking in advance

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #35697

    Alexandr Smaga
    Participant

    Hello.

    You have to configure your entity’s ownership type(see doc), after that you have to run php app/console oro:entity-config:update to apply configuration.

    When those steps done Oro/Bundle/OrganizationBundle/Form/Extension/OwnerFormExtension.php will add dropdown automatically.(please ensure that your templated extends OroUIBundle/action/update.html.twig or use oro_form_process twig function when renders the form)

    #35698

    SHAD0WF4X
    Participant

    Thanks, is it also possible to use this dropdownbox with my own custom entity instead of User, Business Unit or Organization?

    #35699

    Alexandr Smaga
    Participant

    Yes you can! See doc. Also you can refer to some existing form types(for example this one)

    #35700

    SHAD0WF4X
    Participant

    I configured my entity’s ownership like you said and everyting works. Although I got a little bug. The create and update pagine do not show the correct names of my entity its fields. It shows Twm.Orocrm.Project.TwmProjects.Code.Label* instead where project is my bundle, TwmProjects my enitity and Code is a field of TwmProjects. How is this possible and how to fix this?

    #35701

    SHAD0WF4X
    Participant

    Pagine should be page*

    #35702

    Alexandr Smaga
    Participant

    Just add this string to translation file

    #35703

    SHAD0WF4X
    Participant

    Is there a way to undo this? I removed everyting I added, but the organisation bundle keeps asking for the getOwner method eventhough I removed owner completly

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

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top