Standardizing Display Formats for References Using Composability (Platform 3.9+)
In real-world implementations, customers often have different preferences for how entities—such as customers, suppliers, products, or warehouses—should be displayed and searched within business applications.
This primarily affects search links and dropdowns used to define foreign key relations.
The Challenge
Until now, developers had to define the display format for each reference individually within every component. For instance, customer references were typically shown by name only.
However, requirements from end users have become more diverse. Some want to see customers displayed as:
Debtor number – Name
Name – Customer number
- or simply
Name
Similar variations are being requested for other entities like warehouses, departments, and products.
The New Approach (Platform 3.9+)
Starting with Platform version 3.9, a more composable method is available that simplifies and standardizes how references are displayed—while still allowing flexibility for end-user needs.
How it works:
-
Dedicated Display Components
Create small, focused components that define how a contact (or other entity) should be displayed. For example:-
M11208
: DisplaysDebtor number – Name
(includes caching for better search performance) -
M11209
: DisplaysName
only
These components act as substitutes based on display preferences.
-
-
Standard Output Feature
Each component outputs the same feature:
N_Contact.Key description (fx)
-
Decoupled Consumption
Other components useN_Contact.Key description (fx)
in their search links, so developers no longer need to define presentation logic in each place. -
Composable Configuration
Application composers can choose betweenM11208
,M11209
, or any other component that provides theN_Contact.Key description (fx)
feature. The application’s composition determines the final display format.
Updating Existing Components
Existing components can be updated without regression. Here’s the process:
- Replace references to
N_Contact.Name
withN_Contact.Key description (fx)
- On first update, application composers will be prompted to select the display component
- As more components are updated, consistency across the application will naturally increase
By leveraging composability, you can now standardize display formats across your application while preserving flexibility and control for end users.