How do I hide options on the Add an approval modal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago - last edited a month ago
Go to the table where the modal opens (example: sysapproval_group or chg_approval_def).
Create a Client Script → Type = onLoad
2. Mark it for Workspace:
Make sure "UI Type" = All (or specifically Workspace).
That way it runs both in classic UI and in Workspace.
Client Script :
function onLoad() {
// Hide unwanted choices from 'wait_for'
g_form.removeOption('wait_for', 'workflow'); // removes Workflow
g_form.removeOption('wait_for', 'process_flow'); // removes Process Flow
}
🔹wait_for = field name
🔹'workflow' / 'process_flow' = choice Value (not label, check your sys_choice )
3. Target only Workspace Modal (optional): If you want it to only apply when opened in Agent Workspace (not in classic UI), you can check:
function onLoad() {
if (typeof window.NOW !== "undefined" && window.NOW.hasOwnProperty("workspaceConfig")) {
// This means it's running inside Workspace
g_form.removeOption('wait_for', 'workflow');
g_form.removeOption('wait_for', 'process_flow');
}
}
Shashank Jain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @CCSF-Syd you want to add a modal inside a form or you just want to append another option for that approval field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
I want to REMOVE the two options I have striked out in red from that dropdown in the modal