How to set related list to read-only based on state field value

rafaelvd
Kilo Explorer

Hi,

I had received a request from a client as to set related lists to read-only according to State field value. I planned to just set the ACL for this to work.

I've already asked hi.service-now for assistance, but this requires customization so they advised I post here for help..

But I have a problem on how do I do this if the related list is not exclusive to Change records such as Problems and Incident lists. Is there a way to do this or at least just disable the list editing only when the change record is loaded without affecting any users editing via the Incident table? Also as far as the buttons go, I think it can be hidden via script right?

How would I also apply this if the related list is an m2m list?

12 REPLIES 12

Michael Fry1
Kilo Patron

Why not use List Control? Something simple like current.state != 1 might be a start.


Hi Michael,



I would use List Control or a script to hide the Add/Edit buttons. But some users would try to edit the values via list edit.


Hi Michael,,



Through List control List editing can be totally disabled. Bow how to make it condition based?


-Anurag

If the condition under List control evaluates as true, it will hide the New and/or Edit buttons.


Yes, that's correct...But still list edit will be open for the existing records in the related list. Here the requirement is to stop that list editing of existing record based on a condition.


-Anurag