添付ファイルの削除をユーザーによって管理したい
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 01:01 AM
テーブルのレコードにファイルを添付できますが、添付ファイルを削除できる人、できない人を区別することはできますか。現在、添付ファイルの削除ボタンをユーザーロールによって管理することはできますか。
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 01:04 AM
in English please ?
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 03:40 PM
I can attach files to records in a table, but can I distinguish between who can and can't delete attachments? We are currently considering whether the delete attachment button can be managed by user role. Please let me know if there is any other good way to do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 11:43 PM - edited 12-21-2023 11:44 PM
Yes you can control it by creating a business rule as like below :
Name: Restrict Delete attachment on RITM
Table: sys_attachment
Advanced: check
When: Before
Delete: check
Filter Condition: Table Name is sc_req_item or any other table you want to restrict
Script Conditon:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if(!gs.hasRole('admin')){
current.setAbortAction(true);
}
})(current, previous);
☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-21-2023 06:21 AM
Google translate: I can attach files to records in a table, but can I differentiate between who can and cannot remove attachments? Is it currently possible to control the delete attachment button by user role?