Hide Attachments file
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2024 10:53 PM
I have requirement to hide attached files on RITM for a particular catalog item, I was able to achieve this using an UI script and client script to avoid DOM manipulation. I called UI script in Client Script.
But now I want to hide the attachments which are visible after clicking on Manage Attachment Icon.
UI script :
function hideAttachmentSection() {
var attachmentElement = document.getElementById('header_attachment');
if (attachmentElement) {
attachmentElement.style.display = 'none';
}
}
Client script :
function onLoad() {
//Type appropriate comment here, and begin script below
var reqUser = g_form.getValue('requested_for').trim();
if (g_form.getValue('cat_item') == g_scratchpad.propertyValue && (!(g_scratchpad.grp || g_user.userID == reqUser))) {
hideAttachmentSection();
}
}
Please help me to hide the attachment files from manage attachment icon.
0 REPLIES 0