Why do we get “You can’t delete the last link” message when we try to delete/remove an attachment on our BOM or Item? In the screenshot we are trying to remove 10004893.pdf because the other file is the newest one.
Message: You can’t delete the last link
Page 1 / 1
Hi @sarah
To delete a file from Acumatica, click the ‘Edit’ link for the file in the Files dialog.
This will take you to the File Maintenance screen. From here, you can delete the file from Acumatica all together by clicking the trash can icon.
For background into the error message you are getting, Acumatica allows for the relationship between files and records to be many-to-many. This means you can attach multiple files to the same record, and link the same file to multiple records (even records of completely different types). When a file is linked with only one record, removing the link would mean the file becomes orphaned, which is sounds like Acumatica does not like.
Since you mentioned that you would like to replace the 10004893.pdf file with a newer version, Acumatica has an option for that as well. Acumatica’s Document Management feature allows for files to be versioned. If you would like Acumatica to keep both versions of file under the same ‘file entry’, you can open the File Maintenance screen for your file and select ‘Upload New Version’. Acumatica will list the whole version history of the file along with who added each version and when. This can be useful if you need to review older versions of the file at a later date.
When a file has multiple versions like this, Acumatica always uses the most current version.