- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:15 AM
Hi All,
I have a requirement to restrict user from deleting attachment in change ticket once state changes to assess. But user can add attachments in any state.
I have applied after/delete BR, but it is not showing any error. It is allowing user to delete the attachment and as the page gets refreshed, the document comes back. But this will make user confuse.
So I am looking for a approach that as user tries to remove the attachment after assess state, system should throw a error.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 03:18 AM
Nope. I don't think any other way.
1 thing you can do
1) hide the attachments itself in that state so that they don't see or delete it
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:25 AM
the BR on sys_attachment should be before Delete and yes it won't show the message which you give in addErrorMessage() function. That's platform behavior.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 02:45 AM
Hi @Ankur Bawiskar ,
Thanks for your quick response, but is there any other way to achieve this. As customer wants this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 03:18 AM
Nope. I don't think any other way.
1 thing you can do
1) hide the attachments itself in that state so that they don't see or delete it
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader