To hide attachments in the record for few users

nivethika
Tera Contributor

Hi Team,

All user seeing the Attachments in case of any do exist, so resolvers that are not part of the "Past assigned groups" which is the custom field reference to sys_user_group table should not see/download attachments from few tables dynamically . In which way i can achieve it easily. Hope i have to create ACL for sys_attachment table. 

Correct me i am wrong with the steps would be helpful.

1 ACCEPTED SOLUTION

Hi @nivethika 

RoshneeDash_0-1750747560119.png

 

Your feedback makes the community stronger! If you found this helpful, marking it as the correct answer helps others.
Stay awesome,
Roshnee Dash

View solution in original post

8 REPLIES 8

Roshnee Dash
Tera Guru

Hi @nivethika 

If you want to restrict access from the header section of a record, you need to write an onLoad client script for the specific table where you want this restriction to apply.
Within that client script, use GlideAjax to check whether the currently logged-in user is a member of either the Assignment Group or the Past Assignment Group.

Based on the result of that check, you can conditionally apply logic. For example, if the user is not a member of either group, you can include a line like this in your script to enforce the restriction:

document.getElementById('header_attachment').style.display="none"; 

 and to hide the clip icon

g_form.disableAttachments();

 

Your feedback makes the community stronger! If you found this helpful, marking it as the correct answer helps others.
Stay awesome,
Roshnee Dash

Thank you @Roshnee Dash,

Can you share me the script if you have, would be helpful if you share that.

Hi @nivethika 

RoshneeDash_0-1750747560119.png

 

Your feedback makes the community stronger! If you found this helpful, marking it as the correct answer helps others.
Stay awesome,
Roshnee Dash

Thank You @Roshnee Dash 

I tried this same solution it didn't work for me can you help me on this more.