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

Declarative action not working for service operations

Neeta5
Tera Contributor

Hello 
i have a requirement to create a declarative action view workbench which will users to major incident workbench i have create a client script declarative action but its not working 

function onClick(g_form, g_aw) {
    var sysId = g_form.getUniqueValue();
    var cacheBuster = Date.now();
    var url = "/$major_incident_workbench.do" +
              "?sysparm_stack=no" +
              "&sysparm_sys_id=" + sysId +
              "&sysparm_use_cache_buster=true" +
              "&uxpcb=" + cacheBuster;
 open(url);}
1 REPLY 1

NagaChandaE
Kilo Sage

Hi @Neeta5 ,

This works for me 

function onClick() {

    var sysId = g_form.getUniqueValue();
    var cacheBuster = Date.now();

    var url = "$major_incident_workbench.do?sysparm_stack=no&sysparm_sys_id=" + sysId + "&sysparm_use_cache_buster=true&uxpcb=" + cacheBuster;

    open(url);
}