Skip to content

Commit deab9c2

Browse files
Create README.MD
This file provide the instructions or usages of the code.
1 parent 06dd568 commit deab9c2

File tree

1 file changed

+18
-0
lines changed
  • Client-Side Components/Client Scripts/Dynamic Greeting Based on Time

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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.”

0 commit comments

Comments
 (0)