Reference Icon - Remove or Prevent Clicking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2009 04:26 AM
We have noticed that by clicking on several reference icons our users can get to parts of the system we don't want them to see.
To address this issue we'd like ideally to restrict the reference icon to be a pop up only and not clickable. If this is not possible then we would then want to look to remove the icon altogther.
Please note though, we do not want to get rid of the icon throughtout our instance, only certain occurances of it.
I have seen comments in the post of others to say there is some script available in the Wiki that deals with reference fields, but I can't seem to find it. Can anyone help?
Many Thanks
Helen
- Labels:
-
Orchestration (ITOM)
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2009 04:36 AM
I found this in the wiki page called useful scripts, it's part of a bigger script to make those fields read-only so please check out the link as you might need the whole script, worth testing: http://wiki.service-now.com/index.php?title=Useful_Scripts#Make_fields_read-only_in_a_client_script
// Remove the magnifying glass when disabling reference fields
var refs = document.getElementsByTagName("a");
if (refs) {
for (var i=0; i < refs.length; i++) {
var ref = refs;
var att = ref.getAttribute('HREF');
var inner = ref.innerHTML;
if (att.indexOf("incident.cmdb_ci") > 0 && inner.indexOf("reference_list.gifx") > 0) {
ref.style.display = 'none';
}
else if (att.indexOf("incident.assigned_to") > 0 && inner.indexOf("reference_list.gifx") > 0) {
ref.style.display = 'none';
}
else if (att.indexOf("incident.assigned_to") > 0 && inner.indexOf("log.gifx") > 0) {
ref.style.display = 'none';
}
}
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2009 12:00 PM
I'm doing something similar on a field-by-by field basis like making the RITM field read-only, but still clickable when viewing a task or approval:
function onCondition() {
//hide Mag glass
dissableField1 = document.getElementById('lookup.sc_task.request_item');
dissableField1.style.display = 'none';
//Set obj to read only
var objCaller = document.getElementById('sys_display.sc_task.request_item');
objCaller.disabled = true;
}
The challenge I have is that the "Requested For" field (sc_request.requested_for) appears on my RITM and TASK forms and I'm not sure what the magic combination of object items is to reference it (or do I need one for each table sc_task and sc_req_item)?
I've tried (Table: sc_task) and the above value: lookup.sc_task.sc_request.requested_for, I've tried lookup.sc_task.requested_for, and had no luck.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-03-2009 11:43 AM
I found the answer I was looking for. Thanks to Ian Broz who recommended FireBug to help me identify objects. I had to create two UI Policies (one that acts on sc_task table and one that acts on sc_req_item table). They are both similar.
I call this one: Hide Mag Glass REQUEST_FOR RITM
function onCondition() {
//hide Mag glass
dissableField1 = document.getElementById('lookup.sc_req_item.request.requested_for');
dissableField1.style.display = 'none';
//Set obj to read only
var objCaller = document.getElementById('sys_display.sc_req_item.request.requested_for');
objCaller.disabled = true;
}
This one is: Hide Mag Glass REQUEST_FOR TASK
function onCondition() {
//hide Mag glass
dissableField1 = document.getElementById('lookup.sc_task.request_item.request.requested_for');
dissableField1.style.display = 'none';
//Set obj to read only
var objCaller = document.getElementById('sys_display.sc_task.request_item.request.requested_for');
objCaller.disabled = true;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2011 08:40 AM
FYI - There is now a property available to make read-only reference fields display an "info" icon with popup and click-through capabilities.
http://wiki.service-now.com/index.php?title=Reference_Icon#Reference_popup_visibility_for_read-only_fields