Show Paper Clip Attachment based on ACL

ican
Tera Contributor

I have a role with read access only to a custom table but I want to show paper clip in the form for that specific role.

All field should be read-only but paper clip should be displayed and role can attach files.

When I give write access to that role the paper clip is displayed but all the fields are editable which should not be.

 

I only want the role to have read access and can attach files to the form.

How can I achieve this?

 

Thank you.

3 ACCEPTED SOLUTIONS

Anil Lande
Kilo Patron

Hi,

In Addition to your current configuration create one more acl.

 

You need to create table.* ACL for Write access for your table and do not add your role. Add roles who can edit information of that table record.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

Yes, that is the only option. (if they want it)

But you can ignore it as users is not able to edit fields on form.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

Please check below link:

https://joshneri.us/serverside-hasroleexactly-in-servicenow/

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

5 REPLIES 5

Anil Lande
Kilo Patron

Hi,

In Addition to your current configuration create one more acl.

 

You need to create table.* ACL for Write access for your table and do not add your role. Add roles who can edit information of that table record.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

ican
Tera Contributor

Also the update button is displayed. Should i just edit the OOTB Update button and add condition for my role so that it wont show?

Yes, that is the only option. (if they want it)

But you can ignore it as users is not able to edit fields on form.

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

ican
Tera Contributor

But how can I hide this button though since the gs.hasRole method always returns true if you have admin role so it will be hidden for me as well also?