OnCell Edit make a field readonly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 01:12 PM
Hi Can someone help me with how to make a field readonly onCellEdit (No ACL)
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;
//Type appropriate comment here, and begin script below
saveAndClose = false;
callback(saveAndClose);
}
Is this the right way of doing it?
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 01:27 PM
Hi Shruthi,
May I know the business case for this as ACL of type: list_edit can simply work & is the recommended approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2023 05:39 AM
JaspalSingh, were could I go in my PDI to see the "list_edit" ACL? I would like to review and see if I can use it as the recommended approach for the onCell edit. Thank you for sharing your knowledge and expertise.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2020 02:06 PM
Hi,
If you're unable to use ACL (which as Jaspal is saying is the best way to go about it), you can simply put:
callback(false);
in your onCellEdit client script as the only line and that would prevent anyone from editing it. It looks like they can, but nothing they pick or do will save or change.
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
callback(false);
}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2020 06:25 PM
Hi,
I just wanted to check-in on this. If my reply above helped guide you correctly, if you don't mind, please mark it as Helpful & Correct.
Thank you!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!