Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to Hide UX workspace form buttons using client script?

Sharique Azim
Mega Sage

How to Hide UX workspace form buttons using client script.
im trying to hide "close task" button on sc task on workspace only for a particular catalog item, which normally can be hidden via onload client script like this

 

 

var action_name = 'close_sc_task';
var selector_sub = 'button#' + action_name;
var selector_sub_btm = 'button#' + action_name + '_bottom';

$j(selector_sub).each(function() {
  $j(this).hide();
});

 

 

any idea how to do it?

2 REPLIES 2

Ankur Bawiskar
Tera Patron

@Sharique Azim 

DOM manipulation won't work

Why not add conditions in that form action?

current.request_item.cat_item.name != 'Your Item'

AnkurBawiskar_0-1742314165772.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

i was thinking of the same, but thought DOM could have simplified the impacts