- 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
‎01-19-2017 04:48 AM
One way is way Ankur Suggested above.
You can also control it in onload client side via client script also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 05:13 AM
hi Anurag,
how to control it in on load. ?
what i have in mind is (pls correct me if i am wrong)
we can get user role from script inculde or g_scratchpad and use that value to check on on-load client script.
but is manage attachment is part of incident form or is it a UI action.
if part of form, what is the field name for that button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 06:14 AM
Here is a more direct approach
Administering Attachments - ServiceNow Wiki
To restrict who can upload attachments:
- Navigate to System Properties > Security.
- In the Attachment limits and behavior section, locate the List of roles (comma-separated) that can create attachments: property (glide.attachment.role).
- Enter one or more roles separated by commas.
- Only roles listed in this property are able to upload attachments to a record. If no roles are entered, then all roles can upload attachments to ServiceNow forms.
- Click Save.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-19-2017 09:44 PM
its working Nice anurag.
but now the user has no access to add attachments. But now user cant attach any attachments on problem and change as well.
And adding no_attachement attribute does not allow anyone from adding attachement on that table. can we combine no_attachment attribute with something
and make it check role as well ?
is there any incident specific approach.
Or like you were saying before do controlling it in onload Client script possible ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 01:48 AM