Make fields read only based on condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 11:27 PM
Hi all,
I have a requirement where I want to make fields read only when the value of a field is set to 'Approved'. I have two write acls on that table for that role- one table level and one field level. How do I make the record read only for that role by manipulating the acl.
I also tried a script :
if(condition){
answer = false;
}
But this is making all the records read only irrespective of the conditions.
Any help would be appreciated.
Thanks,
Sudhangshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 11:34 PM
Hi @sd2097 ,
Check for ACL which is table_name.field_name and operation is write and in the condition section you can specify the feild is 'Approved'.
If my solution works please mark it as helpful and don't forget to click thumbs up button!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 11:37 PM
Hi @Mr_X ,
Thanks for your reply. Actually there aren't any table_name.field_name acl for those fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 12:53 AM
Hi @sd2097 ,
Then create one as follows
Type: record
Operation: write
Name: table_name--->field_name
condition: field_name is Approved
If my solution works please mark it as helpful and don't forget to click thumbs up button!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 03:15 AM
Hi,
Actually I want the data to be read only if the field value is approved. Not the other way around. Can we do 'is not approved' instead?
Also, what should I give in the roles section? The same role that I gave in the previous acls?