Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Error in declarative action "JSONObject["value"] not found."

Pratik Khamkar
Tera Contributor

I have created a declarative action "Assign to me" on sc_task table. This will visible when current logged in user is part of assignment group and if state of sc_task is open. This declarative action is working fine for some assignment group members. But for few groups when I click on it then it is giving me error message  "JSONObject["value"] not found.".

 

Can someone please help me the reason behind this issue and help me in resolving this issue?

11 REPLIES 11

Pratik Khamkar
Tera Contributor

It's a declarative action.
declarative_action.png

Mark_Didrikson
ServiceNow Employee
ServiceNow Employee

There is a known issue with running this as a Server Script. To resolve, you can use a standard UI Action with the following code in the Workspace Client Script section.

 

Also, check both of the following boxes:

 

 
Format for Configurable Workspace

 

function onClick(g_form) {
    assignToMe();

    function assignToMe() {
        try {
            g_form.setValue("assigned_to", g_user.userID);
            g_form.submit(g_form.getActionName());
        } catch (ex) {
          //  alert("Error: " + ex);
        }
    }
}