ssossossossosso

Forums

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

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 3 years, 6 months ago.

  • Creator
    Topic
  • #30048

    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
  • #30049

    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)

    #30050

    SHAD0WF4X
    Participant

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

    #30051

    Alexandr Smaga
    Participant

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

    #30052

    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?

    #30053

    SHAD0WF4X
    Participant

    Pagine should be page*

    #30054

    Alexandr Smaga
    Participant

    Just add this string to translation file

    #30055

    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)

You must be logged in to reply to this topic.