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

D365 Constituent Country

(5) ShareShare
ReportReport
Posted on by 12

Have a field named Constituent Country in D365 that is automatically filled based off whichever country, within the UK, the Postcode field denotes.

Postcodes have two parts, the first is the broad area of the UK, and the second is the location within that area.

Issue is that sometimes only the first half of the code is available (full codes should look like this: AB1 2CD) yet, D365 will only fill in the Constituent Country field if the whole code is available. This is despite the country being decipherable with only the first half of the code.

Is there anyway to customise D365 to find the country without a full postcode?

Note: countries are England, Scotland, Wales or Northern Ireland.

I have the same question (0)
  • Sohail Ahmed Profile Picture
    11,169 Super User 2026 Season 1 on at

    Yes, this can be handled with a customization.

     

    Since the first half of a UK postcode (the outward code) is enough to determine the constituent country, you can:

     

    Approach

     

    •  

      Create a mapping table in Dataverse or Business Central that links outward postcodes (e.g., AB1, BT7) to their respective constituent countries.


    •  

      Add a plugin or Power Automate flow that triggers when the postcode is entered/updated:

       

      •  

        Extract the first segment of the postcode (before the space).


      •  

        Use that to look up the mapping table.


      •  

        Populate the “Constituent Country” field accordingly.



      •  


    •  
     

    This avoids dependency on the full postcode and gives you control over handling partial entries.

     

    🔧 If you're not a developer, work with your Microsoft partner to implement this logic either through Power Platform (Power Automate) or a backend plugin.

     

    Mark this answer as verified if it helped you.

  • Suggested answer
    DAnny3211 Profile Picture
    11,417 Super User 2026 Season 1 on at

    Hello,

    Thank you for your question.

    The behavior you're describing—where the Constituent Country field in Dynamics 365 is only populated when a full UK postcode is provided—is consistent with how standard postcode parsing typically works in D365. However, as you correctly noted, the first half of the postcode (outward code) is often sufficient to determine the country within the UK (England, Scotland, Wales, or Northern Ireland).

    Recommended Approach:

    1. Custom Logic via Plugin or Power Automate
      You can implement a custom plugin or Power Automate flow that triggers on postcode entry and uses a lookup table to assign the Constituent Country based on the outward code (e.g., AB1, EH2, BT1). This allows for country assignment even when the full postcode is not available.

    2. Reference Dataset
      Use a reliable dataset that maps UK outward codes to constituent countries. This can be stored in a custom entity or configuration table within D365 and referenced during the automation.

    3. JavaScript on Form Level (Model-Driven App)
      If you're using a model-driven app, you can add JavaScript to the form to evaluate the postcode field and populate the Constituent Country field dynamically based on the first segment.

    4. Data Validation and User Guidance
      Consider adding a tooltip or validation message to inform users that entering at least the first half of the postcode will trigger country assignment, improving data entry consistency.

    5. Third-Party Integration (Optional)
      If your organization uses address validation services, some providers offer APIs that can resolve constituent country from partial postcodes. These can be integrated into D365 via custom connectors.

    Please verify if this response was helpful.
    Best regards.

  • Suggested answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at
    Hi, Please check whether the value has been maintained in Post Codes.
     
    Thanks.
    ZHU

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans