Posts

Showing posts from June, 2023

Styles

 Client Script // Setting styles using client code function setStyle(response, control) { var style = response.responseXML.documentElement.getAttribute("answer"); control.setStyle(style); } function onChange(control, oldValue, newValue, isLoading, isTemplate) { //alert (oldValue + "  " + newValue); var tableName = g_form.getTableName(); // Change the background color based on status field. var ajax = new GlideAjax('ProjectStatusColorHelper'); ajax.addParam('sysparm_name', 'setStatusColor'); ajax.addParam('sysparm_value', newValue); ajax.addParam('sysparm_table_name', tableName); ajax.addParam('sysparm_field_name', 'u_status'); ajax.getXML(function(response) { setStyle(response, control); }); }

ACLs

Image
  For ACLs you first need access to the table, then to the field. Think of it as walking up to a house. You can't get in the house (table) without the door being unlocked. Once inside, the rooms, are the rows/fields. So those need to be unlocked as well to go in to those ( table.* or table.row/field ). For table.none means that you are applying the ACL at the table level. For table.*, means that you are applying this for all rows/fields on that table which don't have their own specific table.field ACL. So it's more of a "meta-ACL", if you will. Then there's table.row/field, means you are applying this for that specific field Example of a row level ACL (from chatGPT) Let's say you have an "Incident" table in ServiceNow, which contains records of various incidents reported by users. You want to restrict access to certain incidents based on their priority. You can define a row-level ACL that allows only users with a specific role, such as "Man...

Related Lists

 To change the name of a label of Related List: sys_translated_text.list Table Name= Relationship [sys_relationship] Document= e.g.  Relationship: Benefit Plans Change the Value Alternatively go to the List Control and make sure it has a "Label".  This label for example "Expense Lines" would then be translated in sys_translated.list To hide a related list, go to the form itself and hit the hamburger