How to create ACL on Extended fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2022 03:26 AM
Hello All,
I got a requirement to set one field on the form to readable state for specific user role on the child table , to create write acl on that particular field could see that the field is extended from parent table.
Ex:
Child table : Workplace
Child table field: Start date (Extended from Parent table Reservations)
Could someone please guide me here to accomplish this one.
Thanks,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2022 03:41 AM
You can try to create an ACL for the specific field only.
Thereby you should have 2 ACL`s one that provides access to the table, if you do not have that already, and the second one that targets the desired field name the table name should be the child one.
Then you can link the ACL with the role.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2022 03:51 AM
Hi Ram,
Simply write onload client script on child table and if that works like below and don't touch ACLs.
function onLoad()
{
if(g_form.hasRoleExactly('nameofrole'))
{
g_form.setReadOnly('nameoffield', true);
}
else
{
g_form.setReadOnly('nameoffield', false);
}
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2022 04:38 AM
Hello Rasheed & Ed,
Thanks for the reply.
I'm going ahead with client script only as the restriction is on form level.
I have written the below script but I'm not getting alert also and the field is not setting Readable / Readonly based on roles.
function onLoad() {
//Type appropriate comment here, and begin script below
if(g_form.hasRoleExactly('sn_wsd_case.manager'))
{
alert('mgr');
g_form.setReadOnly('start', false);
g_form.setReadOnly('end', false);
}
else
{
alert('not mgr');
g_form.setReadOnly('start', true);
g_form.setReadOnly('end', true);
}
}
There is one Ui Policy which is making the field(start) Readonly i set it to Leavealone.
Not sure why the client script is not working could you please help me here.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2022 04:51 AM
Thank you, I got to know we have to use g_user to check the role.