The CreatorCon Call for Content is officially open! Get started here.

Making reference field read-only loses hover icon

Brian Broadhurs
Tera Contributor

I have a UI Policy that makes some fields read-only. I've discovered that when a reference field is made read-only, the hover icon disappears, so it is not possible to hover and see the contents of the referenced record, or to click through to that record.

Is there any way to make a reference field read-only while retaining the ability to hover and click through?

Brian Broadhurst

5 REPLIES 5

CapaJC
ServiceNow Employee
ServiceNow Employee

I believe we've got an open Problem for this issue. A reference field's popup icon should have nothing to do with whether or not the field itself is read-only, rather read rights to the target record should dictate its presence.

Someone else may have come up with an elegant (or even blunt) workaround, however.


kwazur
Tera Contributor

Has this been fixed in a Service-now Release yet?


Mark Stanger
Giga Sage

I found this client script sample in another post. You should be able to create a client script instead of your UI policy that looks something like this. The code below will make the 'caller_id' field on the incident form read-only.



function onLoad()
{
var objCaller = document.getElementById('sys_display.incident.caller_id');
objCaller.disabled = true;

var objCallerMG = document.getElementById('lookup.incident.caller_id');
objCallerMG.style.display = 'none';
}


CapaJC
ServiceNow Employee
ServiceNow Employee

I just spoke w/ a Sr Developer, and he agreed that the hover/clickthrough icon should not be sensitive to UI policy. After Winter 2009 Stable 4 is completed this wknd, I'll see about making that change for Spring 2009.

By the way, if you make a field read-only on its dictionary record, there is a property in UI Properties that dictates whether or not the hover/clickthrough icon will appear: "Allow click-through of a reference field when the reference field is read-only". The property is false by default.

I think when I make the change, I'll honor the same property so behavior is consistent regardless of how a field is made read-only.