PageStyle is a new strongly-typed data type introduced in Business Central 2024 release wave 2 (BC25). It defines a set of standardized styles that can be applied to controls (like fields) in page objects. This change replaces the loosely defined string-based Style property with an enum-style approach that offers better code clarity and consistency.
🎯 Why Did Microsoft Introduce PageStyle?
Prior to BC25, developers used the Style or StyleExpr property with predefined strings such as Favorable, Unfavorable, or Standard. While effective, this method lacked strong typing, IntelliSense support, and made code more prone to errors.
With the new PageStyle data type, Microsoft aims to:
- Improve developer experience with type-safe styling
- Reduce errors caused by mistyped style strings
- Make UI customization more readable and standardized
- Prepare the platform for future extensible styling options
What’s New:
This new data type PageStyle was introduced in Business Central 2024 release wave 2 (BC25) which represents the different kinds of styles that can be applied to page controls.
Page property responsible for Colour of field is Style property. This has changed in this wave (BC25), new data type PageStyle.
Below are some members of PageStyle:
Member |
Description |
None | None |
Standard | Standard |
StandardAccent | Blue |
Strong | Bold |
StrongAccent | Blue + Bold |
Attention | Red + Italic |
AttentionAccent | Blue + Italic |
Favorable | Bold + Green |
Unfavorable | Bold + Italic + Red |
Ambiguous | Yellow |
Subordinate | Grey |
Let’s implement with one example:
Output:
💡 Why PageStyle Matters for Business Central Development
- Improved code safety: Avoid typos and unsupported styles
- Cleaner development experience: Leverage IntelliSense in Visual Studio Code
- More consistent UI: Aligns styling across pages and controls
- Future-ready: Easier to extend and maintain as Microsoft adds new features
🔧 Stay Ahead with Madhda
At Madhda, we help businesses leverage the latest Dynamics 365 Business Central enhancements. Whether you’re upgrading to BC25, customizing fields and pages, or optimizing user experience—our experts are ready to support you every step of the way.
📩 Need help implementing PageStyle or upgrading your solution to Business Central 2024 release wave 2?
Let’s talk! We’ll make sure your system is clean, modern, and future-ready.