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) {
//...
}
Comments
Post a comment