- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 04:32 AM
HI all,
when you open incident form on the top right header label there is manage attachments button(paper clip icon).
i want it to be visible only user with some particular role (like only admin can see that icon) for all others its hidden.
Pls tell me what are the ways to achieve it.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 02:38 AM
k, then undo everything done so far.
Just write an onload client script to read the user role and if the user doesn't have the appropriate roles then just
g_form.disableAttachments();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2024 07:55 AM
Hi Sir,
HR case state is closed complete the attachment icon should not be visible in the Portal.
how to achieve this? Does your solution work for the portal as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 03:31 AM
Try using onLoad() Client script.
if(!g_user.hasRole('admin')
{
g_form.disableAttachments();
var ma = gel('header_attachment_list_label');
ma.style.display = 'none';
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2017 08:40 PM
hi rajesh,
g_form.disableAttachments(); did the trick.
can you please tell me what this will be doing in the code.
var ma = gel('header_attachment_list_label');
ma.style.display = 'none';
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2017 12:47 AM
Manage Attachment Lable won't be visible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 04:22 AM
Hello Jayanthi,
Write a OnLoad() client script on the required table:-
(Here role1 and role 2 are the required roles who are not needed to view the attachment icon)
if(g_user.hasRole('role1') || g_user.hasRole('role2'))
{
g_form.disableAttachments();
}
Note:- Please mark helpful if it works for you