File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Client-Side Components/Client Scripts/Dynamic Greeting Based on Time Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ How it Code work Step by Step
2+
3+ Trigger:
4+ This script runs onLoad (when the Incident form is opened).
5+ It only applies to the Incident table.
6+ Get current hour:
7+ new Date().getHours() → fetches the current system hour (0–23 format).
8+ Example: 9 = 9 AM, 15 = 3 PM, 20 = 8 PM.
9+ Condition (Ternary Operator):
10+ If hour is < 12 → Morning
11+ Else if hour < 18 → Afternoon
12+ Else → Evening
13+ Add Info Message:
14+ g_form.addInfoMessage(...) shows a friendly banner on top of the form.
15+ Example output:
16+ Morning (9 AM) → “Good Morning! Please provide the details of your issue.”
17+
18+ Evening (8 PM) → “Good Evening! Please provide the details of your issue.”
You can’t perform that action at this time.
0 commit comments