read-only a field in list view

Mr_X1
Tera Contributor

I wanted to make the "Request item" field read only on list view.

 Currently im using onCellEdit client script [ below code ], Its not getting save but i want the field to be Read-Only

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = false;
callback(saveAndClose);
}

Can you please show me how to make the field read-only

 

find_real_file.png

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

1) elevate your role as security_admin

2) create new list edit ACL on catalog task table and field as request_item

3) use advanced checkbox as true

4) admin overrides uncheck - means even admin cannot list edit

4) script as

answer = false;

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

13 REPLIES 13

nupur_goswami
Tera Contributor

@Ankur Bawiskar  I had a similar problem, and found your suggestion helpful, thanks.
I just have one question can this be applied on based on the roles. I have a requirement where people who have user role cannot edit the fields in list view, but people who have manager role should have the access to edit all the fields on list view. 

Do you have suggestions on how (if)  that be achieved ?

Best regards

 

@nupur_goswami 

Can you post a new question for this and share all the details and tag me there as this is an old thread?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sure

 

nupur_goswami
Tera Contributor

Hi @Ankur Bawiskar 
Thanks for your previous responses, It works and I have closed the previous threads and accepted as solution