Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Need to create a lookup field but not mapped to the ID field

Posted on by

Hi all:

I need to create a lookup field in one entity to reflect a lookup value from a source entity; when I create the field in the 1st entity, I have to choose the 2nd entity.  This means that the mapping is (in this example):

salesorderid        >     new_pricelist

So all that shows on the 1st entity is the actual name of the Order, not the price list.  Is there a way to accomplish this?

*This post is locked for comments

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: Need to create a lookup field but not mapped to the ID field

    Do you need the actual data to be on the new entity?

    If you just need to display it, I would recommend that you go with Quick View, and only display the field that you need.

    Hope this helps.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Need to create a lookup field but not mapped to the ID field

    You may create a field on the form and set it to readonly

    You can then use javascript on_change of lookup value and populate the readonly field with the lookup value from source entity.

    This will require you to use Xrm.WebApi.retrieveRecord(entityName, contactId, options)  to retrieve the value and formContext.getAttribute("yourfieldname").setValue(result["sourcefieldname"])

    Please mark as verified answer if this help.

    Thanks,

    SM.

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Need to create a lookup field but not mapped to the ID field

    Hello Rob,

    Lookup will always display primary field of the entity whatever it is, so to implement your requirement I can think of two options (there may be others)

    1. Setup a workflow to copy value of the pricelist to primary field so that it can show in the lookup in another entity, you can look some details here: community.dynamics.com/.../136580 but i don't think you want to do that

    Another option could be to simply use quick view forms to show your other information based on the lookup selected so you can show price list field with it. you can refer www.magnetismsolutions.com/.../how-to-add-a-quick-view-form-in-microsoft-dynamics-365

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans