Change - Restrict ability to remove attachments after approval.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 03:47 AM
Hi all,
Can we restrict ability to remove attachment after changes are approved for Normal and Emergency Change Requests at Scheduled/Implement/Review/Closed States.
Please can any one suggest me other than acl.
Thanks,
Sindhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 06:17 AM
Hi Sindhu,
ACL is the best option for this.
If not using then ACL then have onLoad client script on change request table and have following script. This uses DOM manipulation
condition will be if state = approved and type is either Normal or emergency
function onLoad(){
if(condition is true){
document.getElementById("header_add_attachment").style.display = 'none'; // this will hide the paper clip icon
// also you need to hide the Manage Attachments since user can delete the attachment from this as well
document.getElementById('header_attachment_list_label').style.display = 'none';
}
}
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2023 12:31 AM
Hi @Ankur Bawiskar @
I also have the same requirement but I want to restrict the user to remove the attachment but user should be able to attach additional attachments. Can we do this.
Regards,
Shriyansh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 06:21 AM
Hi ,
I think ,You can write an Before delete business rule for the attachment table .
similar to like this:
if(tableName == 'change_request')
{
Do a gliderecord and query only state is Scheduled/Implement/Review/Closed .
{
return false;
}
}
Thanks,
Syed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 10:49 PM
Thanks Farhan ! Will definitely implement and let you know the output.