Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

Lookupfield to show multiple fields after selection

Posted on by 35

Hi guys,

I have a request to have a lookup field on the Account entity to show account name and account number AFTER a record has been selected.

pastedimage1613116527472v1.png

So instead of "Leins and Company" the expectation of our users would be to see "Leins and Company (0000123456)"
I have already a calculated field that concatenates this information, but I do not know how I can make the lookup field to display it.

Any help is very much appreciated.
Thanks.

//Christian

  • Adnan Jalees Profile Picture
    Adnan Jalees 455 User Group Leader on at
    RE: Lookupfield to show multiple fields after selection

    Thanks Christian, glad to hear about it! :)

    Thanks,

    Adnan

  • Christian Leins Profile Picture
    Christian Leins 35 on at
    RE: Lookupfield to show multiple fields after selection

    Option 1 will do the trick.

    Thanks.

  • Verified answer
    Adnan Jalees Profile Picture
    Adnan Jalees 455 User Group Leader on at
    RE: Lookupfield to show multiple fields after selection

    Hello Christian, 

    As lookup the primary key field of the reference entity will be displayed on the form.

    pastedimage1613124141608v2.png

    you can have 2 options,

    Option 1:

    Account primary key field as display field of the reference entity as formatted string. 

    • Rename display name of existing Account Name field to "Display Account Name"
    • you can create another custom text field as Account Name,  you can use it as for storing Account Name instead of system name field. You'd require to add new field in Account Forms & Views also (if needed).
    • and use system field (which you will rename to "Display Account Name") to be populated with formatted text e.g. (new custom Account Name & Account Number) either through workflow or plugin

    In this case account lookup will be shown as preformatted value in all entities where account entity is used as referenced entity.

    Option 2:

    You can change the display value of the reference field.  I don't think it's the recommended/support way to do it. 

    refer the links as mentioned below. 

    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/136580/change-the-display-text-in-lookup/291757

    http://burnignorance.com/ms-crm-app-development-tips/how-to-change-display-text-of-a-lookup-field-in-dynamics-crm-2011-using-javascript/

    I suggest Option 1 as a solution. Hopefully you will be able to map the business requirements. what's your input on it?

    Let me know if you have  questions. 

    Thanks,

    Adnan

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,554 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,588 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans