Hiding attachment for 'opened for' on hr case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 11:45 AM
Hi Team,
I want to hide attachments for 'opened for' user on hr case.
I created a query business rules on sys_attachment on table:
Created BR on global scope on sys_attachment table
This code is working fine , but I want to add conditions like table = 'sn_hr_er_case' and opened_for != gs.getUserName()
So, I wanted to use below code:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 12:36 PM
Did you also try g_form.disableAttachments()
if (g_user.hasRole('admin'))
return;
g_form.disableAttachments();
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2023 01:01 PM
HI Sanjiv,
I only want to hide attachment from opened for person but not to disable attachment.