- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 12:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 02:28 AM
Hi,
By using Client script, you can achieve that. Go through below thread, this will helps you.
Mark Correct/Helpful, if this resolve your query.
Regards,
Devyani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 02:40 AM
Hi,
This should work with an ACL, You need to add a Table level delete ACL on the sys_attachment table (sys_attachment. None) with a scripted condition.
The ACL script will validate if the attachment table_name=change_request and fetch the change request record by accessing on the table_sys_id field to validate its current state.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2019 02:49 AM
Thank you very much.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2020 06:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2021 07:33 AM
Hi,
There are 2 ways to implement the solution to this.
1) first one is to disable the "Remove" button in UI page "Attachment".
However doing so will skip the UI page page from future upgrades thus take client's approval before doing so.
Below is the code changes i did to disable the Remove button.
line 64 -- >
function setRemoveButton(e) {
var removeButton = gel("removeButton");
if (g_form.getValue("state") != '-5') {
removeButton.disabled = "true";
} else { place OOB code here}
2) Second approach is to create a Delete ACL or Abort BR at Deletion on Sys_attachment table.
When abort takes place , update the custom created boolean field on table where attachment is present.
Hide the field on form by UI policy/client script but keeping it on form is important.
Once Abort BR(on before) on sys_attachment table is executed , add code to update custom field to true.
Create an on change client script which runs when custom field is true and reloads the form (g_form.save())
when the reload happens for that create a custom Display BR which runs when custom field is true and display error message for deletion and
sets back boolean field to false (so that the message doesn't appear on every reload.)
This is the best i could think of while working on this requirement
Please mark my answer helpful or correct if it helps you.
Regards
Gurvinder Singh