Announcements
The code defines a field for "Planned Time" with a style controlled dynamically by the StyleExprTxt variable. The OnAfterGetRecord trigger updates StyleExprTxt by calling the GetStyleBasedOnTime procedure from the TimeStyle codeunit. This procedure sets the field's style based on the current time and the planned time value:
It returns 'favorable' if the current time is within 10 minutes before the planned time.
It returns 'Unfavorable' if the current time is past the planned time.
It returns an empty string as a default if neither condition is met.
Don't forget to like and close it by verifying if answer is satisfied.
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156