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 :
Small and medium business | Business Central, N...
Suggested Answer

map the Country field from Dynamics 365 CRM to Business Central

(5) ShareShare
ReportReport
Posted on by 160

We have a Country table in CRM and are trying to synchronize the country value from CRM to Business Central. However, the integration only works when the country code is entered in CRM.

For example:

CRM Country = Germany → ❌ Does not populate the corresponding Country/Region in BC.

CRM Country = DE → ✅ Successfully populates Germany in BC.

The Integration Field Mapping appears to require the Country Code rather than the country name.

How can we configure the integration so that when the user selects/enters "Germany" in CRM, Business Central automatically identifies the corresponding country code (DE) and populates the correct Country/Region in BC?

We would like to avoid requiring users to manually enter country codes in CRM.

  • Suggested answer
    OussamaSabbouh Profile Picture
    20,887 Super User 2026 Season 2 on at

    Hello,
    You can handle this without asking users to enter DE. In Integration Table Mappings > Mapping > Fields, add a Transformation Rule to the Country field mapping; Business Central specifically supports transformations when Dataverse and BC values differ. For this scenario, use the Field Lookup transformation against the Country/Region table so the incoming value Germany is matched to the Name and the corresponding Code (DE) is returned to the Customer’s Country/Region Code. If your CRM Country is a custom lookup and cannot be resolved with the standard Field Lookup transformation, then a small custom transformation/event subscriber would be required.

    Regards,
    Oussama Sabbouh

  • Suggested answer
    Grigorios Mavrogeorgis Profile Picture
    3,888 Super User 2026 Season 2 on at

    Hi, the mapping doesn't really ask for the code, it just copies the text and BC then validates it against the Country/Region table, where the key is the Code. That's why Germany fails.

    You can try without code first. On Integration Table Mappings choose Mapping, then Fields, and on the country line there is a Transformation Rule column. Make a new rule with type Field Lookup, pointing to the Country/Region table, source field Name, target field Code. I didn't test this exact case on the sync, so try it in sandbox. The catch is the name must match exactly what BC has, "Deutschland" or a typo won't be found. And if the mapping is bidirectional BC will send DE back to CRM, so check the direction.

    If that's not enough, a small extension. Subscribe to OnTransferFieldData in codeunit Integration Record Synch. and do the lookup yourself.

     

    Glad to help - follow up if anything is unclear.   

    ►  If this solved it, marking it verified helps others too.       

    Regards,
    Grigorios Mavrogeorgis
    Business Central Consultant & AL Developer

    Work: Gmsoft Limited
    Blog:  insidebusinesscentral
    LinkedIn: linkedin.com/in/gregorymavrogeorgis

  • Suggested answer
    YUN ZHU Profile Picture
    104,136 Super User 2026 Season 2 on at

    As far as I know, this can only be achieved through customization... this is standard behavior.

    You can give the approach below a try, though I don't think the key can be changed.

    Business Central 2024 wave 1 (BC24): Add table and field mappings to existing integration tables (Dataverse)

    https://yzhums.com/49260/

    Business Central 2026 release wave 1 (BC28): Map new Dataverse fields (New and custom Dataverse tables are readily available for mapping from the lookup on Integration Table column)

    https://yzhums.com/71914/

     

    Thanks

    ZHU

  • Suggested answer
    D365BC_AmanKr Profile Picture
    291 on at

    Hi,

    You can solve this by mapping the CRM Country Name to the Business Central Country/Region Code through a lookup or transformation in Dataverse integration. Instead of passing “Germany” directly, configure the integration table mapping so that when a user selects “Germany” in CRM, the system looks up the corresponding Country/Region record in BC and sends “DE.” This way, users continue entering country names in CRM, while the integration automatically translates them into the correct codes for BC.

    Example: If CRM Country = Germany, the mapping translates it to DE, and BC receives “DE” → Germany. This avoids requiring users to manually enter codes and ensures consistent synchronization.

    Hope it will help you.
    Please Verify if you found the answer helpful so that it will help others.

    Many Thanks
    Aman 

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 633 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 419 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 236 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans