OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – How do I? Questions Display Name instead of Id on Autocomplete Field in User Entity

This topic contains 4 replies, has 2 voices, and was last updated by Hiro Hiro 6 years ago.

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

  • Creator
    Topic
  • #28193
    Hiro
    Hiro
    Participant

    Hello,

    I have added extra Field to pre-existing Entity with Migration Script like this:

    New field Branch is now displayed at User Detail Page in Additional Section, but the autocommplete drop down list displays Branch Id. I need to display Branch Name instead.

    How do I do that? Did I have to pass more config setting with addManyToOneRelation()?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #28194
    Hiro
    Hiro
    Participant

    In addition to this, I have noticed the selected value is not displayed after setting Branch and save it.
    When I see the database the data is stored.

    #28195

    Vova Soroka
    Participant

    Hi @Hiro,

    To display the branch name you just need to specify it in $targetColumnName parameter of addManyToOneRelation.

    About the second question: it seems like a bug, I’ll check it.

    #28196

    Vova Soroka
    Participant

    yes, I can reproduce the problem that the selected value is not displayed. We’ll fix it ASAP.

    #28197
    Hiro
    Hiro
    Participant

    Thank you for the reply. I created new Migration Script and it worked.

    I leave the sample code for others:

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

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

You will be redirected to [title]. Would you like to continue?

Yes No