How to tell if catalog client script running on catalog item, RITM or task

 where the script needs to run on all 3, 

getTableName seems to do the trick.

note this will return null if in s-portal but seems fine

g_form.setReadOnly('<a_variable>', true);

try { var sTable = g_form.getTableName(); //alert(sTable); if (sTable == 'sc_req_item') { g_form.setReadOnly('<a_variable>', false); } } catch (ex) { //... }


Popular posts from this blog

GlideRecord setValue

Running transform maps asynchronously

Post a command to the ECC queue for the mid server to initiate a powershell file copy