How to Hide Attachements, Description and Notes for incidents assigned to Edge Support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2025 11:41 PM
Hi Team ,
can anyone please help me on this requirment .
How to Hide Attachements, Description and Notes for incidents assigned to Edge Support .
Except edge support , admin it should show , for other user it should hide . please provide setps for this
Up until now we have hidden all elements of incidents assigned to Edge Support from all users who are not members of Edge Support group or Major Incidsent Managers - This however is proving to be frutrating for the AUDIT team who are unable to report on incident volumes and other governance elements as these incidents are no visisble to them - Another option is to hide the fields that contain sensitive PII data instead of hiding the whole tickedt perhaps by using some of the aoptions listed below:
Is that possible to hide attachments and specific fields on the Incident form for specific users or groups .
can anyone please provide me the detailed configuration steps to achieve this requriment .
if possible please provide screenshots for better understanding .
Thanks in davnce
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 12:07 AM
Hi @nameisnani ,
try this
to hide the description and notes better go with Deny unless read ACL
update appropriate groups
var checkUserInGroup = Class.create();
checkUserInGroup.prototype = Object.extendsObject(AbstractAjaxProcessor, {
_checkUserInGroup: function(userName, group) {
return gs.getUser().getUserByID(userName).isMemberOf(group);
},
checkUserInGroupAjax: function() {
return this._checkUserInGroup(this.getParameter('spmuserName'),this.getParameter('spmgroup'));
},
type: 'checkUserInGroup'
});
onload client script with isolate script as false
function onLoad() {
var ga = new GlideAjax('checkUserInGroup')
ga.addParam('sysparm_name', 'checkUserInGroupAjax')
ga.addParam('spmuserName', g_user.userName);
ga.addParam('spmgroup', 'Edge support'); //update correct group name
ga.getXMLAnswer(function(ans) {
if (!(ans == 'false' || g_user.hasRole('admin'))) {
//Type appropriate comment here, and begin script below
hide('header_add_attachment'); //hides paper clip icon
hide('header_attachment'); // hides attachment bar
g_form.setDisplay('description', false);//better go with ACL for this
}
});
}
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 12:24 AM
Hi @nameisnani
I suggest creating 'Deny Unless' ACLs on the Incident and Sys Attachment tables.
Sample:
Incident.description: (Modify the group name as required & create similar one for the worknotes)
if (gs.getUser().isMemberOf('Service Desk')) {
answer = true;
} else {
answer = false;
}
sys_attachment ACL:
answer = false;
var inc = new GlideRecord('incident');
inc.get(current.table_sys_id);
var group = inc.getDisplayValue('assignment_group');
if(group!='Service Desk'){ //CHANGE GROUP NAME
answer = true;
}else{
if(gs.getUser().isMemberOf(group)){
answer = true;
}else{
answer = false;
}
}
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 01:14 AM
Along with attachment , i want hide worknotes as well , please provide your inputs for this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 01:20 AM
@nameisnani
Create one more ACL with similar configuration as I mentioned earlier.
Under name, select "work_notes" instead of description.