If the customer want conditional coloring of rows based on some conditions, as developers didn't had the functionality support from the earlier versions of Dynamics NAV Role-Tailored Client.
With the new versions of Dynamics NAV, this was allowed and was able to change the color of the text depending on the predefined conditions. Even though the functionality was allowed, still have limitations for the formatting. Such as, the number of colors support to this functionality is fixed.
Following is a sample for the styled text page in the Dynamics NAV 2013 R2
Sample of Styled Page in Dynamics NAV |
Formatting is done by using a property value for style on a field and setting it to a pre-defined value.
Go to the design view of a page and select a field that you want to change the color and then go to the properties of the field.
(Design Page -> Property of the Field want to change the color)
As you see 'StyleExpr" was already set to "FALSE" and system will show the value in default manner.
To modify the style follow the following steps,
1. Design the page
2. Define a global variable of type text ( StyleText Text 20 )
3. Assign the Style Code value to defined variable in the "OnAfterGerRecord" trigger depending on the condition.
Following is a sample code.
Tharanga Chandrasekara
*This post is locked for comments