How to delete a file from an entity which is having System.FileDocument generalization.

3
Hi All, I have created an entity which is having System.FileDocument generalization and having some other attributes in the entity. In a list view I am showing all editable fields of this entity and FileManager for uploading file. The requirement is , I need to add a delete button for each record in next screen and when I click on delete button, the file should be deleted and the remaining data must be there. I didn't find any option to delete only the file from the entity So, please provide the solution for this. And also is there any widget in app store to upload a single file ( I know that DROPZONE is for multiple documents upload) because the FileManager is very basic one. Thanks in advance.
asked
2 answers
2

I think you need to make a separate Entity with the other attributes and reference to this FileDocument entity. That way you can safely delete the files without removing the object with the other attributes.

As far as I know, there is no other widget in the AppStore that only supports uploading one file. You could see if you can do a feature request for the DropZone widget on Github, asking for a single file upload, instead of multiple

answered
0

I think, data grid extension will help you. In this add-on, we will be having inline buttons option. Using this, provide a action button in a column, call a microflow on click of this button, delete file object of this particular entity and commit it. Hope so, it may work.

answered