Уреди

Делите путем


Apply country/region context

As part of the requirements for LCS solutions for localization and translation, localization ISV solution providers must implement all country-specific or region-specific functionality so that it can be controlled by country/region context. This article describes how to apply country/region context to meet these requirements. In this article you can find information how you should use country context property and what application objects control user interface elements.

Country/region-specific functionality

You use country/region-specific functionality to help meet the legal, regulatory, and business requirements of individual geographies. A geography is any country or region that is identified by an International Organization for Standardization (ISO) country or region code. The following table highlights the main elements that you use to configure country/region-specific functionality.

Element Description
Controlled entity The controlled entity is a UI element that is hidden or shown, depending on whether its country/region context matches the country/region context of the controlling entity. To enable menus, menu items, and form controls that are based on country/region context to be hidden, a controlled entity includes a CountryRegionCodes property on some elements. You use this property to specify the country or region where the element is shown. You find the CountryRegionCodes property on the following Application Object Tree (AOT) elements:
  • Extended data type
  • Menu and menu items
  • Enum and enum value
  • Table and table field
  • Data entity and data entity field
  • View and view field
  • Map and map field
  • Form control
  • Tile
Controlling party The controlling party’s role is used to determine whether country/region-specific functionality or UI elements are enabled. The controlling party is defined by the Organization model. Examples include legal entity, customer, vendor, bank, or worker. By default, the legal entity is used as the controlling party. If the country/region context of the controlling party matches the country/region context of the controlled entity, the functionality or UI elements are enabled. You set the country/region context of the controlling party. Any controlled entities that have a matching country/region context are shown.

Using the CountryRegionCodes property

You create country/region context on a controlled entity by setting the ISO code value on the CountryRegionCodes property. You can find the list of ISO country and region codes on the ISO website. The values of the CountryRegionCodes property are compared to the country/region context of the controlling party. If the values match, the element is shown. Otherwise, it's hidden.

Tip

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

The Country/region value in the primary address of the legal entity determines the country/region context of the controlling party. The default value of the Country/region field is the locale of the system. The following illustration shows how to set the primary address of the legal entity. LE_Edit_address.

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/region or require specific validation of vendors from a specific country/region. To set the controlling party, use the CountryRegionContextField property of the form, control, or other element. This property lets you 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. DE_CountryRegionContextField.

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

Additional resources

ISO codes