We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Ankur Bawiskar
Tera Patron

Out of the box Flow context UI action is available in native view but not in Service Operations Workspace.

If you wish to show it in workspace then we need to modify the OOB UI action.

Ensure you set both the checkboxes as true in the UI action and update the script as this.

Workspace Form button and Format for Configurable Workspace

Script

function onClick(g_form) {
    var gr = new GlideRecord("sys_flow_context");
    gr.addQuery("source_record", g_form.getUniqueValue());
    gr.query(checkRecord);
    function checkRecord(gr) {
        if (gr.next()) {
            var url = '/now/workflow-studio/builder?tableName=sys_flow_context&builderId=flow-execution&sysId=' + gr.sys_id;
            open(url);
        }
    }
}

AnkurBawiskar_0-1736305534202.png

 

 

Version history
Last update:
‎01-07-2025 07:05 PM
Updated by:
Contributors