Tokyo: File delete failed message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2022 09:44 AM - edited 10-19-2022 09:46 AM
Getting below message when non-admin user is trying to upload a file on a table with field as type of "File Attachment".
Things I tried:
1. Disable all the BRs and client scripts on the table.
2. Check the ACL. Found that user does have the necessary role.
3. Added another field and the user was able to upload for that. So the issue is only with this field. There are no ACL for table.field.
4. Admin is able to upload file.
Any idea? It only started after we upgraded to Tokyo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 03:11 AM
Hi @TT3 @Uhn @Pablo Espinar1 @Michele30 ,
Our applicationn is also affected but little bit scenario is different in our case - In one of the status working exactly fine but in next status getting this error msg when adding any attachment in 2nd time also when user is clicking on cancel button then we can see that Attachment is attached eventhough there was error message file.delete.failed.
Was it same for you guys as well?
@Hemant Poojari above KB article was not accessible for me. Can you please provide if any updated link is there for this. Or little bit details is also helpful that when ServiceNow is going to fix this issue.
Thanks,
Krishnakant Yadav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2024 03:57 AM
The KB is still customer-facing (not public) and the link has not changed. Please try signing into the NowSupport portal and then open the link. This will be tentatively fixed in Xanadu.
Posting here the workaround since you are unable to open the link :
The workaround is the following:
- Create a new sys_security_acl with operation=delete for sys_attachment
- Add a role if needed (for example, itil)
- Put the following into the script section:
answer = false; if (current.table_name == null || current.table_name == '') answer = true; |
In case the issue is on attachments for custom tables, the condition will need to be instead:
if (current.table_name == null || current.table_name == '' || current.table_name == 'ZZ_YYx_custom_table_name') |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2024 01:00 AM
Hi @TT3
There may be ACL on Attachment table in which it is restricted to delete attachment for non admin Users or may be there is Client Script & Script Include or Business Rule can also be there on Attachment table to restrict deletion. Same issue we found it out for our Project And with many R&D we got the Root Cause.
Thanks,
Krishnakant Yadav