Is there any way to hide attachment from a record in the incident table (Header and also from the activity stream)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2018 12:08 AM
I have a requirement that the attachment to an incident record should not be visible in the form header and also in the activity stream but should be visible in the related list tab only for some groups. Can anyone please suggest how to achieve this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2018 12:36 AM
Hi muktha,
I'm not sure it will work but try to create the following Business Rule:
Create a business rule with the following information:
- Active: True
- Advanced: True
- Table: sys_attachment (Attachments)
- Condition: !gs.getUser().isMemberOf(<groupName>)); && gs.getSession().isInteractive()
- Script:
hideAttachments();
function hideAttachments(){
var answer = 'sys_created_by=' + gs.getUserName();
current.addEncodedQuery(answer);
}
Hope this will help for your need.
Please, mark Correct or hit Helpful if you find my response worthy.
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2018 01:17 AM
Hi Muktha,
Could you please share some screenshot so that it is more clear where you want to hide the attachment Icon and where you want to show for some groups.
To hide the attachment Icon in header you can write a display business rule:
var validGroup = {"sysIdOfGroup1": "y", "sysIdOfGroup2": "y", "sysIdOfGroup3": "y"};
var currentGroup = current.getValue("assignment_group");
g_scratchpad.showAttachment = false;
if(validGroup[currentGroup]) {
g_scratchpad.showAttachment= true;
}
then you can use this g_scratchpad object in onLoad client script to hide the attachment Icon in form header as shown below:
function onLoad() {
if(g_scratchpad.showAttachment == false)
{
gel('header_add_attachment').style.display = 'none';
gel('header_attachment_size_checker').style.display = 'none';
}
}
Please mark this correct/helpful, if it resolves your issue.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2018 09:55 PM
Hi Muktha,
You can hide attachment from incident table by adding attribute in dictionary as mention below.
- Open a record in the table.
- Right-click in the header bar and select Personalize > Dictionary.
- In the list of dictionary entries, select the first record in the list (the record with no Column name entry).
- Add no_attachment to the Attributes field, separated by commas from any existing attributes.
You can manage related list condition by using OnLoad client script by using following methods.
g_form.hideRelatedList()
g_form.showRelatedList()
By using above methods and using scripting, related list requirement can be achieved.
Warm Regards,
Devyani
Engineer