Can't hide fields in service operations workspace with client script

Jo_o Pedro
Tera Expert

So i have these fields that i need to hide when i open a certain task or RITM but the problem is the script just keep getting ignored. It works in the default view but it doesn't work in the Service Operation Workspace

 

in workspace

Jo_oPedro_1-1722028820526.png

In the default view

Jo_oPedro_2-1722028994615.png

And here is my catalog client script. I already tried to use "g_form.setDisplay('variables.vs_login')" since the field is in the variables section but it didn't work.

function onLoad() {
    var shortDescription = g_form.getValue('short_description');
    if (shortDescription == 'Analisar solicitação') {
        g_form.setDisplay('vs_login', false);
        g_form.setDisplay('vs_email_task', false);
        g_form.setDisplay('vs_password', false);
    }
}

 

 

 

8 REPLIES 8

abirakundu23
Mega Sage

Hi @Jo_o Pedro,

 

Your code is correct, please select UI type is "ALL" instead of 'Desktop' or "Mobile/Service Portal', then it will be work for Service Operation Workspace.

abirakundu23_0-1722067002841.png

 


Please mark helpful & correct answer if it's really worthy for you.

Yes. I always set this field to all

SK Chand Basha
Giga Sage

Hi @Jo_o Pedro Put UI Type to All

I always set this field to all