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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to add field nationality from Custom Entity Country that have a column name nationality from a contact form ?

(0) ShareShare
ReportReport
Posted on by

I have a trouble to setup a field on a custom contact form.

I want to have a nationality field in my custom contact form  that can display a dropdownlist (or lookup value) of all nationalities from Entity country on the field nationality.

at this time I can only create a lookup field in custom contact form, where I can only see the list of country name.

if someone can help me,

thanks,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Jason M. Cosman Profile Picture
    5,234 Moderator on at

    Hello Laurent!

    I hope this fine Wednesday finds you. It sounds like you have a wonderful problem here. The cool thing I'd suggest here is Auto Complete field see the blog post here: www.powerobjects.com/.../double-down-with-crm-2016-introducing-two-new-features-web-api-and-autocomplete;utm_medium=feed&utm_campaign=Feed%3A+PowerobjectsMicrosoftCrmBlog+%28PowerObjects+Microsoft+CRM+Blog%29 . It would be wonderful for what your doing and I think provide you with a nice drop down or text entry field for your users!

    In the odd chance your looking for just another field from nationalities field to be pulled and set the option set on the entity for your on. I'd recommend javascript to pull that field from the Nationalities entity and then set the proper option set to the proper value. If you have the same option set on both entities I'd recommend using a global option set to ensure that both option sets have the same values!

    I'd love to hear your opinion on this so please let me know!

  • ScottDurow Profile Picture
    21 on at

    So you want to have a text box that holds the text value from the display name of another entity? You could use an autocomplete as Jason says - or you could use the lookup and then extract the display name from the lookup when it changes and write it to a text field - this can be done using a Business Rule.

    You find my post on this subject interesting - community.dynamics.com/.../option-set-lookup-or-autocomplete

  • Jason M. Cosman Profile Picture
    5,234 Moderator on at

    Awh Scott! Excellent idea; I'll be adding this to my list of ways to extract the data instead of just javascript. The Business Rules are so much more friendly to non developers overall. Great blog post as well!

  • Community Member Profile Picture
    on at

    this is very interesting but it's not exactly that I want.

    here is some screenshot to explain what I want to do.

    Entity Countries displayed by a view that contains only the fields country and nationality

    contact_5F00_form_5F00_select_5F00_nationality_5F00_from_5F00_country_5F00_entity_5F00_01.png

    then my custom contact form that have a field nationality lookup where I want to select a nationality from entity countries

    contact_5F00_form_5F00_select_5F00_nationality_5F00_from_5F00_country_5F00_entity_5F00_01.png

    Thanks for your help.

  • Jason M. Cosman Profile Picture
    5,234 Moderator on at

    Hello Laurent;

    I think I now understand what your looking for. In this case every entity has a main attribute or primary one usually by default its like "prefix_name" and it's 100 character string if you didn't over write it. When using lookups this field is what would be displayed when using a lookup. If your Nationality field isn't the primary field it won't display as the value selected. Based on your view of Countries and Nationalities; is Country a lookup field?

    I'm not sure that your going to get what your looking for here without a different solution. What would be the Countries and Nationalities primary field? The way to do this is to go to customizations open the solution select the entity itself and the second tab over shows the primary field.

    Let me know your thoughts on this please as it would be great to see if we can find a resolution for you!

  • Community Member Profile Picture
    on at

    Hi Laurent,

    One of the limitations of a lookup is that it always refers to te 'name' field of a record in the first place. However, the line where you now have a date field (Created on by default) can be changed via the Country (or any entity) lookup view.  Place the nationality field in the second column of that view and you might have allready solved your problem. In addition to that, include the 'nationality' dropdown field in your quick find columns of your quick find view - so that users can type both the first few letters of either te country or nationality name and the field wil autocomplete.

    Or, you can create a global option set from your current option set with nationality. Then, create a calculated option set (using the same global option set) field on contact that references the one on the country entity, meaning that if a country is filled in, the nationality will be filled in automatically as well.

    Hope this helps!

    Kind regards,

    Robin

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

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