Skip to content

Commit ded602d

Browse files
authored
Create script.js
1 parent 55c575e commit ded602d

File tree

1 file changed

+9
-0
lines changed
  • Client Scripts/Conditional Form Section based on Role

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function onLoad() {
2+
var userHasRole = g_user.hasRole('case_manager'); // Check if user has specific role
3+
4+
if (userHasRole) {
5+
g_form.setSectionDisplay('budget_approval', true); // Show section if user has specific role
6+
} else {
7+
g_form.setSectionDisplay('budget_approval', false);
8+
}
9+
}

0 commit comments

Comments
 (0)