A) Master direct links (open / create)
Every professional HR Leave screen. Click → create with the property tables below.
B) Application — all properties + suggested values
| Property | Suggested professional value | Notes |
| Name | HR Leave | Required |
| Scope | x_786686_hr_leave | Cannot change later |
| Version | 1.0.0 | Bump on each promote |
| Description | Enterprise leave requests, balances, approvals, audit for HR | |
| Vendor | Your company name | |
| Create application menu | true | Creates HR Leave navigator |
| Active | true | |
| Update Set property | Suggested value |
| Name | HR Leave – Build v1.0 |
| Application | HR Leave |
| State | In Progress |
| Description | Professional HR Leave core + security + process |
C) Tables — create properties + every column (professional)
How to create each table (detail):
- Application picker = HR Leave · Update Set current.
- Open Studio → select HR Leave.
- Click Create Application File → search Table → Create.
- Fill Label + Name from table below → Extends = (empty — do not extend Task) → Create.
- Open table → related list Columns → New for each row → Save.
- For Choice columns: open column → related list Choices → New for each value.
- Configure Form Layout / List Layout as listed.
C1) HR Employee — x_786686_hr_leave_employee_v2
| Table property | Suggested value |
| Label | HR Employee |
| Name | x_786686_hr_leave_employee_v2 |
| Extends | (none) |
| Create module | true (or add in OBJ-25) |
| Create access controls | true (refine in OBJ-19) |
| Is searchable / Live feed | false / false |
| Column | Label | Type | Max / Ref | Mandatory | Display | Suggested default / notes |
u_user | User | Reference | sys_user | Yes | | Platform login of employee |
u_employee_id | Employee ID | String | 40 | Yes | Yes | e.g. E-1001 · unique |
u_department | Department | String | 100 | | | People Ops / Engineering / … |
u_manager | Manager | Reference | sys_user | Yes | | Approver source for BR1 |
u_join_date | Join Date | Date | | | | YYYY-MM-DD |
u_grade | Grade | String | 20 | | | G1–G10 or band code |
Form layout order (suggested): Employee ID | User | Department | Manager | Join Date | Grade
List layout: Employee ID, User, Department, Manager, Grade
C2) Leave Request — x_786686_hr_leave_req_v2 (hub table)
| Table property | Suggested value |
| Label | Leave Request |
| Name | x_786686_hr_leave_req_v2 |
| Extends | (none) |
| Auto-number (optional) | Prefix HRLX · start 1000 · or fill u_number in BR |
| Column | Label | Type | Max / Ref | Mandatory | Read-only | Suggested |
u_number | Number | String | 40 | | Yes after insert | Display · HRLX0001 |
u_requested_for_user | Requested For | Reference | sys_user | Yes | | Default = current user (RP) |
u_employee_ref | Employee | Reference | employee_v2 | Yes | | HR profile link |
u_leave_type | Leave Type | Choice | — | Yes | | See choices below |
u_start_date | Start Date | Date | | Yes | | |
u_end_date | End Date | Date | | Yes | | ≥ start |
u_days_count | Days | Integer | | | Yes | Set by BR1 / CS2 |
u_state | State | Choice | — | Yes | | Default draft |
u_approver_user | Approver | Reference | sys_user | | Yes for employees | From manager via BR1 |
u_reason | Reason | String | 1000 | If sick (UI Policy) | | |
Choices — u_leave_type
| Value | Label | Sequence | Suggested use |
| annual | Annual | 1 | Default paid leave |
| sick | Sick | 2 | Requires reason (UI Policy) |
| unpaid | Unpaid | 3 | No balance debit (optional policy) |
Choices — u_state
| Value | Label | Sequence | Who sets |
| draft | Draft | 1 | Default on new |
| submitted | Submitted | 2 | UI Action / Catalog / user |
| approved | Approved | 3 | Flow / manager |
| rejected | Rejected | 4 | Flow / manager |
| cancelled | Cancelled | 5 | Employee / portal |
Form layout: Number | State | Requested For | Employee | Leave Type | Start | End | Days | Approver | Reason
List layout: Number, Requested For, Leave Type, Start, End, Days, State, Approver
C3) Leave Balance — x_786686_hr_leave_bal_v2
| Column | Label | Type | Suggested |
u_employee_ref | Employee | Reference → employee_v2 | Mandatory |
u_year | Year | Integer | 2026 (current year) |
u_leave_type | Leave Type | Choice | Same as req (annual/sick/unpaid) |
u_entitled | Entitled | Integer | 20 or property annual_days |
u_used | Used | Integer | 0 at year start · BR3 updates |
u_remaining | Remaining | Integer | = entitled − used |
C4) Leave Audit — x_786686_hr_leave_audit_v2
| Column | Label | Type | Suggested |
u_leave_ref | Leave | Reference → req_v2 | Mandatory |
u_old_state | Old State | String(40) | e.g. submitted |
u_new_state | New State | String(40) | e.g. approved |
u_event_type | Event Type | String(60) | state_change |
u_actor | Actor | Reference → sys_user | Who changed state |
D) Script Includes — form properties
| Property | HRLXProLeaveUtilsV2 | HRLXProSecurityUtilsV2 | HRLXProIntegrationUtilsV2 (REST) |
| Name | HRLXProLeaveUtilsV2 | HRLXProSecurityUtilsV2 | HRLXProIntegrationUtilsV2 |
| API Name | x_786686_hr_leave.HRLXProLeaveUtilsV2 | …SecurityUtilsV2 | …IntegrationUtilsV2 |
| Client callable | true | false | false |
| Active | true | true | true |
| Accessible from | All application scopes | Same | Same |
| Description | Business days, approver, balance, audit, GlideAjax | ACL helpers canRead/canWrite | Inbound leave create for REST |
| Script | Paste full from Studio Create guide OBJ section / Scripts portal |
Create steps: Studio → Create Application File → Script Include → fill table → paste script → Update → test in Scripts – Background.
E) Business Rules — all properties (BR1–BR4)
Create steps (every BR): Application = HR Leave → New Business Rule → set Table = x_786686_hr_leave_req_v2 → Advanced = true → paste script → Active = true → Update.
| Property | BR1 Calculate Days | BR2 On Submit Event | BR3 Audit State | BR4 Approve/Reject Event |
| Name | HRLX BR1 Calculate Days | HRLX BR2 On Submit Event | HRLX BR3 Audit State Change | HRLX BR4 Approve Reject Event |
| Table | x_786686_hr_leave_req_v2 |
| Active | true |
| Advanced | true |
| When | before | after | after | after |
| Insert | true | true | false | false |
| Update | true | true | true | true |
| Delete | false |
| Order | 100 | 200 | 300 | 250 |
| Filter Conditions | (none) | (none) — script uses changesTo | (none) | (none) |
| Role conditions | (empty) |
| Duty | Set u_days_count + approver | Fire submitted event | Audit + balance on approve | Fire approved/rejected events |
F) Client Scripts — all properties
| Property | CS1 Validate Dates | CS2 Calc Days GlideAjax |
| Name | HRLX CS1 Validate Dates | HRLX CS2 Calc Days GlideAjax |
| Table | x_786686_hr_leave_req_v2 |
| UI Type | All |
| Type | onChange |
| Field name | u_end_date | u_end_date |
| Active | true |
| Inherited | false |
| Global | false (scoped) |
| Description | End ≥ start | Preview business days via SI |
Also create (professional): duplicate CS1/CS2 as onChange on u_start_date with same scripts so changing start recalculates too — Name suffix “Start” · Field = u_start_date · Order 100/110.
G) UI Policy + UI Action — properties
| UI Policy property | Suggested value |
| Table | x_786686_hr_leave_req_v2 |
| Short description | HRLX Sick leave requires reason |
| Active | true |
| Order | 100 |
| Condition | [u_leave_type] [is] [sick] |
| On load | true |
| Reverse if false | true |
| Global / Isolate script | false / true |
| UI Policy Action → Field | u_reason · Mandatory=true · Visible=true · Read only=false |
| UI Action property | Suggested value |
| Name | Submit |
| Table | x_786686_hr_leave_req_v2 |
| Action name | hrlx_submit_leave |
| Form button | true |
| Form context menu | false |
| List banner / List choice | false |
| Client | false (server) |
| Active | true |
| Show insert / update | false / true |
| Condition | current.u_state == 'draft' |
| Order | 100 |
| Script | set state submitted; update; redirect |
H) Roles · Groups · Users · ACLs — professional matrix
Roles (create each)
| Name | Description (suggested) | Assignable by | Elevated privilege |
| x_786686_hr_leave.employee | Submit and view own leave | hr_admin | false |
| x_786686_hr_leave.manager | Approve team leave | hr_admin | false |
| x_786686_hr_leave.hr_admin | Full HR Leave administration | admin | false |
| x_786686_hr_leave.integration | Scripted REST / Table API create | admin | false |
Groups
| Name | Type | Roles | Active |
| HRLX Employees | security | employee | true |
| HRLX Managers | security | manager (+ employee) | true |
| HRLX HR Admins | security | hr_admin | true |
| HRLX Integration | security | integration | true |
Lab users (professional UAT)
ACL properties (each ACL)
| ACL | Type | Operation | Name | Admin overrides | Active | Advanced | Requires role / Script |
| Read req | record | read | x_786686_hr_leave_req_v2 | true | true | true | Script: canReadLeave |
| Write req | record | write | x_786686_hr_leave_req_v2 | true | true | true | Script: canWriteLeave |
| Create req | record | create | x_786686_hr_leave_req_v2 | true | true | true | Roles employee|hr_admin|integration + script |
| Write approver field | record | write | x_786686_hr_leave_req_v2.u_approver_user | true | true | true | hr_admin only |
Create ACL detail: Elevate security_admin → New ACL → Application = HR Leave → fill row → Script tab → Update. Repeat for employee_v2 / bal_v2 / audit_v2 read for hr_admin (professional: hr_admin full CRUD; employee read own via script).
I) System properties — ALL professional properties + values
Create each: Application = HR Leave → New → fill Name/Type/Value → Update. Ignore Global.
| Name | Type | Suggested value | Description |
| x_786686_hr_leave.config.annual_days | integer | 20 | Default annual entitlement (AU often 20; set 21 if policy requires) |
| x_786686_hr_leave.config.sick_days | integer | 10 | Default sick entitlement for accrual job (optional) |
| x_786686_hr_leave.config.notify_enabled | true|false | true | Master switch for leave emails |
| x_786686_hr_leave.config.min_notice_days | integer | 3 | Optional BR: reject submit if start < today+3 |
| x_786686_hr_leave.config.max_days_per_request | integer | 30 | Optional BR: block oversized requests |
| x_786686_hr_leave.config.erp_endpoint | string | https://webhook.site/your-lab-id | Outbound ERP URL (no secrets) |
| x_786686_hr_leave.config.integration_user | string | hrlx.integration | User ID for inbound API |
| x_786686_hr_leave.config.number_prefix | string | HRLX | Prefix for u_number if scripted |
| x_786686_hr_leave.config.portal_page_id | string | hrlx_home | SP page id for widgets |
| Property form field | Suggested for all above |
| Application | HR Leave |
| Ignore cache | false |
| Private | false (true only for sensitive — prefer aliases for secrets) |
| Read roles | (empty) or hr_admin |
| Write roles | hr_admin / admin |
J) Events · Notifications · Scheduled Job
Event Registry (×3)
| Event name | Table | Fired by | Description |
| x_786686_hr_leave.leave_v2.submitted | req_v2 | BR2 | Leave submitted for approval |
| x_786686_hr_leave.leave_v2.approved | req_v2 | BR4 | Leave approved |
| x_786686_hr_leave.leave_v2.rejected | req_v2 | BR4 | Leave rejected |
Event form: Application = HR Leave · Suffix = leave_v2.submitted (platform may prefix scope) · Queue = (default) · Active = true.
Notifications (×3) — all important properties
| Property | Submitted | Approved | Rejected |
| Name | HRLX Leave Submitted | HRLX Leave Approved | HRLX Leave Rejected |
| Table | x_786686_hr_leave_req_v2 |
| Type | Email |
| Active | true |
| Category | Uncategorized / HR |
| Send when | Event is fired |
| Event name | …leave_v2.submitted | …approved | …rejected |
| Weight | 0 |
| Who will receive | Event parm1 (approver) | Event parm1 (requester) | Event parm1 (requester) |
| Subject | Leave ${u_number} submitted for approval | Leave ${u_number} approved | Leave ${u_number} rejected |
| Message HTML | Include ${u_requested_for_user}, ${u_leave_type}, ${u_start_date}, ${u_end_date}, ${u_days_count}, ${URI_REF} |
| Omit watermark / Include attachments | false / false |
Scheduled Job
| Property | Suggested value |
| Name | HRLX Annual Accrual |
| Active | true |
| Run | Periodically · Yearly · Jan 1 01:00 (or Daily for lab) |
| Run as | System Administrator / hr_admin |
| Application | HR Leave |
| Conditional | false |
| Script | Paste annual_accrual.js from Studio guide OBJ-23 |
K) Application Menu + Modules — all properties
| Menu property | Suggested |
| Title | HR Leave |
| Name | hr_leave |
| Application | HR Leave |
| Order | 100 |
| Active | true |
| Roles | x_786686_hr_leave.employee (minimum) |
| Hint / Description | Leave requests, employees, balances, audit |
| Module Title | Link type | Table (Name) | Order | Roles (suggested) | Filter |
| Leave Requests | List of Records | x_786686_hr_leave_req_v2 | 100 | employee, manager, hr_admin | (empty or active) |
| My Requests | List of Records | x_786686_hr_leave_req_v2 | 110 | employee | u_requested_for_user=javascript:gs.getUserID() |
| Employees | List of Records | x_786686_hr_leave_employee_v2 | 200 | hr_admin, manager | |
| Leave Balances | List of Records | x_786686_hr_leave_bal_v2 | 300 | hr_admin, manager, employee | |
| Leave Audit | List of Records | x_786686_hr_leave_audit_v2 | 400 | hr_admin | |
| Overview | Separator | — | 50 | | |
Module form also set: Application = HR Leave · Application menu = HR Leave · Active = true · Override application menu roles = as needed.
L) Catalog Record Producer — all properties + variables
| Category property | Suggested |
| Title | HR Leave |
| Catalog | Service Catalog |
| Active | true |
| Producer property | Suggested value |
| Name | Submit Leave Request |
| Table name | x_786686_hr_leave_req_v2 |
| Category | HR Leave |
| Active | true |
| Short description | Request annual, sick, or unpaid leave |
| Availability | Desktop + Mobile |
| Roles | x_786686_hr_leave.employee |
| Omit view / Hide on SC home | false / false |
| Script | Paste RP_submit_leave.js (maps producer.* → u_*) |
| Variable Name | Type | Question | Mandatory | Order | Choices / notes |
| leave_type | Select Box | Leave Type | Yes | 100 | annual, sick, unpaid |
| start_date | Date | Start Date | Yes | 200 | |
| end_date | Date | End Date | Yes | 300 | |
| reason | Multi-line Text | Reason | No* | 400 | *Mandatory when sick via Catalog UI Policy if needed |
M) Flow Designer — properties & actions
| Flow property | Suggested value |
| Name | HRLX Leave Approval |
| Application | HR Leave |
| Description | Ask for approval when leave is submitted |
| Run as | System User |
| Status | Published (Active) |
| Trigger | Suggested |
| Trigger type | Record · Updated |
| Table | x_786686_hr_leave_req_v2 |
| Condition | u_state changes AND u_state is submitted |
| Run on | Update (not Insert-only if submit via update) |
| Action | Key fields |
| Ask For Approval | Approver = Trigger → Approver (u_approver_user) · Rules = Anyone approves · Due = 3 business days |
| If Approved → Update Record | Table req_v2 · Record = Trigger · Field u_state = approved |
| If Rejected → Update Record | u_state = rejected |
Create detail: Flow Designer → Create → New flow → set Application HR Leave → add Trigger → add Ask For Approval → add If flow logic → Test with sample sys_id → Publish.
N) Portal + UI Builder — key properties
| Widget property | hrlx_my_leaves | hrlx_balance |
| Name / ID | HRLX My Leaves / hrlx_my_leaves | HRLX Balance / hrlx_balance |
| Application | HR Leave |
| Public | false |
| Roles | x_786686_hr_leave.employee |
| HTML / Client / Server / CSS | Paste from Studio Create OBJ-28 |
| SP Page property | Suggested |
| Page ID / Title | hrlx_home / My Leave |
| Application | HR Leave |
| Roles | employee |
| Open URL | {BASE}/sp?id=hrlx_home |
| UI Builder | Suggested |
| Experience name | HR Leave Workspace |
| Application | HR Leave |
| Pages | My Requests · Approvals · Admin |
| Data resource | Table x_786686_hr_leave_req_v2 |
O) Report · ATF · Scripted REST — properties
| Report property | Suggested |
| Title | Leave Requests by State |
| Source type / Table | Table · x_786686_hr_leave_req_v2 |
| Type | Pie (or Bar) |
| Group by | u_state |
| Aggregation | Count |
| Sharing | Roles: hr_admin, manager |
| ATF property | Suggested |
| Suite name | HRLX Leave Core |
| Test 1 | Server: insert req → assert days > 0 |
| Test 2 | Form: set dates → assert CS days |
| Test 3 | Impersonate employee ACL |
| Application | HR Leave |
| Scripted REST property | Suggested |
| Name / API ID | HRLX Leave API / hrlx_api_v2 |
| Application | HR Leave |
| Requires authentication | true |
| Default ACL role | x_786686_hr_leave.integration |
| Resource | POST /leave · Active true |
| Full path | /api/x_786686_hr_leave/hrlx_api_v2/leave |
P) Professional seed data (suggested lab values)
| Record | Field | Suggested value |
| Employee | User / Employee ID / Dept / Manager / Join / Grade | employee1 / E-1001 / People Ops / manager1 / 2024-01-15 / G5 |
| Balance | Employee / Year / Type / Entitled / Used / Remaining | (E-1001) / 2026 / annual / 20 / 0 / 20 |
| Request | Requested For / Employee / Type / Start / End / State / Reason | employee1 / (ref) / annual / next Mon / next Fri / draft → Submit / Team offsite |