How to hide attachment in service portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2018 10:26 PM
Hi Experts,
How to disable the attachment appearance in activity log of incident form in the portal. In main console i'm able to hide it, But i want to hide it in service portal also. The highlighted part i want to hide. It should only apper in Ticket attachment widget.
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2020 05:15 AM
function mergeStreamEntries() {
$scope.placeholder = $scope.data.placeholderNoEntries;
if (!$scope.data.stream || !$scope.data.stream.entries)
return;
$scope.placeholder = $scope.data.placeholder;
//for hiding attachment in ticket conversation widget, will still be visible in the back end
var modifiedEntries = [];
$scope.data.stream.entries.forEach(function(entry) {
if (entry.element != ("attachment")) {
modifiedEntries.push(entry);
}
});
$scope.data.stream.entries = modifiedEntries;
var entries = $scope.data.stream.entries;
for (var i = 0; i < entries.length; i++) {
if (entries[i].attachment)
entries[i].attachment = $scope.attachmentHandler.canViewImage([entries[i].attachment])[0];
}
if (!$scope.data.mergedEntries) {
$scope.data.mergedEntries = $scope.data.stream.entries.slice();
for (var i = 0; i < entries.length; i++) {
existingEntries[entries[i].sys_id] = true;
}
return;
}
var mergedEntries = $scope.data.mergedEntries;
for (var i = entries.length-1; i >= 0; i--) {
var curEntry = entries[i];
if (isNewEntry(mergedEntries, curEntry)){
mergedEntries.unshift(curEntry);
existingEntries[curEntry.sys_id] = true;
}
}
}
Replace the 'function mergeStreamEntries()' in the client script of the cloned Ticket Conversation widget ( yes you have to clone it because you cannot edit the OOB Ticket conversation widget) with the function above and you will not see attachments on the ticket conversation widget anymore.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2023 08:15 AM
This is very useful, Is there a way to make this code apply to a single type of Record Producer and not all records?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
it worked. thanks