Condividi tramite


Applying Country/Region Specific Functionality

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

You use country and region specific functionality to help meet the legal, regulatory, and business needs of individual geographies. A geography is any country or region that is identified by an ISO country or region code. In Microsoft Dynamics AX, you use country region context for this process. The following table highlights the key elements you use to configure country and region functionality:

Element

Description

Controlling party

The controlling party is defined by the Organization model in Microsoft Dynamics AX. Examples include legal entity, customer, vendor, bank, or worker. The controlling party’s role is to determine whether country/region-specific functionality or UI elements will be enabled on the controlled entity. If the country/region context of the controlling party matches the country/region context of the controlled entity, the functionality or UI elements will be enabled.

The controlling party defaults to the legal entity.

You set the country and region context of the controlling party. Any controlled entities that have matching country and region context will be displayed.

Controlled entity

The controlled entity is a UI element that is hidden or made visible depending on whether its country and region context matches the controlling entity.

To enable hiding menus, menu items and form controls that are based on country context, a controlled entity includes a CountryRegionCodes property on some elements. You use this property to specify the country or region where the element is visible. You find the CountryRegionCodes property on the following AOT elements:

  • Extended Data Type

  • Menu and menu items

  • Enum and enum value

  • Table and table field

  • View and view field

  • Map and map field

  • Form control

Using the CountryRegionCodes property

You create country context on a controlled entity by setting the ISO code value on the CountryRegionCodes property. The list of ISO country and region codes can be found here. Microsoft Dynamics AX compares the values of that property to the country or region context of the controlling party. If the values match, the element is displayed. Otherwise, it is hidden.

Tip

To add more than one ISO country and region codes to the CountryRegionCodes property, you use a comma-separated list.

The Country/region value in the primary address of the legal entity determines the country and region context for the controlling party. The default value of the Country/region field is the locale of the Microsoft Dynamics AX client. The following illustration shows how to set the primary address of the legal entity:

Legal entity form

Setting another party as the controlling party

You can use another party, such as a customer, bank or vendor as a controlling party. For example, you can enable targeted functionality for customers of a specific country or region or require certain validation of vendors from a specific country or region. To set the controlling party, you use the CountryRegionContextField property of the form, control or other element. The property enables you to select the entity that is the controlling party. The default value is the legal entity. The following illustration shows how to set the CountryRegionContextField property for a field.

Setting properties on a control

In this example, customer becomes the controlling entity. The customer address is compared with the value of the CountryRegionCodes field to determine whether the USASpecificSetting is displayed.

See also

How to: Set a Form Control to be Country/region Specific

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.