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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans