Cancel finace case in finance operation workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi Team, could you please help me on development for the below requirement ?
As an finance admin
I want the ability to cancel an active case from the workspace (Finance Operation Workspace)
finance admin need the ability to terminate an active Inter company Balance Confirmation process when the case should no longer proceed.
A workspace action shall be provided that allows authorized users to cancel an active case. Prior to cancellation, the user must provide a cancellation reason. The reason shall be recorded on the case and the case state shall be transitioned to Cancelled.
--- Authorized Users ---
Only users with the Finace admin role shall be permitted to cancel cases.
--- Eligible Cases ---
The Cancel action shall only be available when the case is in an active/open state.
The action shall not be available for:
Cancelled cases
Closed cases
--- Cancellation Reason ---
A cancellation reason shall be required before the cancellation can be completed.
--- Auditability ---
The cancellation reason shall be recorded within the case activity/history by posting to the Comments field.
### Workspace Action ###
--- Button Label ---
Cancel Case
--- Modal Title ---
Cancel Intercompany Case
--- Modal Fields ---
Cancellation Reason (required)
thanks for your time and support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi @msomasekhar
This is a standard "reason-required state transition" pattern so no custom framework needed, just a Workspace UI Action plus a small confirmation dialog.
Approach:
- Visibility/role check — On the UI Action, set a condition combining gs.hasRole('finance_admin') with the case not being in Cancelled/Closed state. This alone controls when the button shows.
- Workspace enablement — Enable the "Workspace" checkbox on the UI Action (not just Form button) so it surfaces in the Finance Operation Workspace action menu.
- Capture the reason — Use a GlideModal (or small UI Page in a dialog) to prompt for the Cancellation Reason before anything executes. Enforce required both client-side (block Confirm) and server-side.
- Audit trail — Write the reason into the existing comments field (gr.comments = 'Cancellation reason: ' + reason;) rather than a new field — it lands in Activity/History automatically with user + timestamp, satisfying the auditability requirement with zero extra schema.
- State transition — After validation, set state to Cancelled and update().
- Route through a Script Include via GlideAjax rather than updating from client script — keeps the role check enforceable server-side (client conditions can be bypassed from devtools) and makes the logic reusable elsewhere later.
- Check field ACLs — Confirm state and comments field-level ACLs actually grant write to finance_admin; otherwise the update can silently no-op even when the UI Action condition passes.
That's the full shape: Workspace UI Action → modal for the required reason → GlideAjax to a Script Include that validates role/state, posts to comments, and flips the state.
If the above explanation helps you, please mark this response as helpful.
