Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

1:1 Relationships - changing what appears in the field with jScript?

Posted on by 1,032

Say I want to create a Country entity. Imagine I do it with the following attributes:

  • ISO_3166-1 Code (this is the primary key)
  • Name (English)
  • Nombre (Spanish)
  • Nom (French)

Now, I would like to make a 1:1 relationship with the Account and Contact entities for a start.

Thing is, I would like the value that should appear in the lookup to be Either the name of the country in French, English or Spanish, depending on the language the user is using.

Here is an example of what I was thinking for a multi-language deployment using a Country entity:

  1. Create an entity with the following values
    a) ISO 3166-1 Alpha 2 Code [this is the primary identifier]
    b) Name  (English)
    c) Nombre (Castellano)

    The idea is to have support for Country names in both English and Spanish (Castellano)
  2. Edit the lookup for this Country entity and allow searching by Nombre (Castellano) and Name (English)
  3. Add a sample country in the list with the values
    a) ISO 3166-1 Alpha 2 Code: UK
    b) Name  (English): United Kingdom
    c) Nombre (Castellano): Reino Unido
  4. Add the relationship with the Account entity and add it into the Account form.
  5. As a test, search in the new Country field for either UK, REINO UNIDO or UNITED KINGDOM, and the field should return the value UK.

PROBLEM: How could I configure the system so it show instead of UK, the country name (Reino Unido or United Kingdom) based on the current locale loaded in CRM?

Is there a way to do such using jScript and form/field events?

Thanks in advance.

Regards,
P.

*This post is locked for comments

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans