web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    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

  • Suggested answer
    Community Member Profile Picture
    on at

    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
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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.

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans