Making reference field read only on a table without affecting underlying table

yundlu316
Kilo Guru

I have a table that that stores basic employee information (1) and another table (2) that has a reference field referencing the basic employee info table.   Through that reference field, I've also dot walked and picked up some additional fields from the basic employee info table.   I want to make some of these fields in table 2 read-only, but not read-only in the base table 1 (basic employee info).   Is there a way to do that?

I tried following the logic in this post: https://community.servicenow.com/thread/173149#734008, but couldn't find how to get to Dictionary Override as the instruction indicates.

Thanks!

1 ACCEPTED SOLUTION

I see what you are saying. You want to dot-walk to place them on the form. Correct. You would have to make them read-only on the original field.



In that case, the UI policy (or client) script is going to be your best solution unless you make new fields on table2 and copy the values from table1 instead of dot-walking. This is similar to how the OOB functionality works on the incident form when you see the caller's location. It takes a bit more scripting to copy over the values.



Thank you for your clarification.



FWIW, best practice suggests limiting the number of dot-walked fields from a reference table as it can be confusing to the user where the information actually resides. Using the hover-over icon is a better way to view information on a referenced record.


View solution in original post

17 REPLIES 17

rlatorre
Kilo Sage

I believe the dictionary override will only work for extended tables using the same field. Have you tried UI Policies?


Ah ok, would it be a UI policy or Client Script?   The only reason I ask is because I came across this wiki: Make Fields Read-Only Script - ServiceNow Wiki and just want to make sure I'm doing it correctly.



Thanks for your response!


Recommend using simple UI Policies when possible.



My understanding is you are attempting to make dot walked fields on a form read only. Use the field picker to find the dot walked field in the UI Policy Action.


Chuck Tomasi
Tera Patron

Is there some reason why checking the checkbox "Read-only" on the reference field on table 2 dictionary entry won't work?